mirror of
https://github.com/gsi-upm/senpy
synced 2025-08-23 18:12:20 +00:00
Add evaluation tests
This commit is contained in:
@@ -18,7 +18,7 @@ class BasicBox(SentimentBox):
|
||||
'default': 'marl:Neutral'
|
||||
}
|
||||
|
||||
def predict(self, input):
|
||||
def predict_one(self, input):
|
||||
output = basic.get_polarity(input)
|
||||
return self.mappings.get(output, self.mappings['default'])
|
||||
|
||||
|
@@ -18,7 +18,7 @@ class Basic(MappingMixin, SentimentBox):
|
||||
'default': 'marl:Neutral'
|
||||
}
|
||||
|
||||
def predict(self, input):
|
||||
def predict_one(self, input):
|
||||
return basic.get_polarity(input)
|
||||
|
||||
test_cases = [{
|
||||
|
@@ -18,7 +18,7 @@ class PipelineSentiment(MappingMixin, SentimentBox):
|
||||
-1: 'marl:Negative'
|
||||
}
|
||||
|
||||
def predict(self, input):
|
||||
def predict_one(self, input):
|
||||
return pipeline.predict([input, ])[0]
|
||||
|
||||
test_cases = [
|
||||
|
Reference in New Issue
Block a user