mirror of
https://github.com/gsi-upm/senpy
synced 2025-08-24 10:32:20 +00:00
Update to senpy 0.20
This commit is contained in:
@@ -43,7 +43,8 @@ class TaigerPlugin3cats(SentimentPlugin):
|
||||
raise ValueError('unknown polarity: {}'.format(value))
|
||||
return polarity, value
|
||||
|
||||
def analyse_entry(self, entry, params):
|
||||
def analyse_entry(self, entry, activity):
|
||||
params = activity.params
|
||||
|
||||
txt = entry['nif:isString']
|
||||
api = TAIGER_ENDPOINT
|
||||
@@ -89,7 +90,7 @@ class TaigerPlugin3cats(SentimentPlugin):
|
||||
},
|
||||
'input': 'I hate to say this',
|
||||
'expected': {
|
||||
'sentiments': [
|
||||
'marl:hasOpinion': [
|
||||
{'marl:hasPolarity': 'marl:Negative'}],
|
||||
},
|
||||
'responses': [
|
||||
@@ -116,7 +117,7 @@ class TaigerPlugin3cats(SentimentPlugin):
|
||||
},
|
||||
'input': 'This is amazing',
|
||||
'expected': {
|
||||
'sentiments': [
|
||||
'marl:hasOpinion': [
|
||||
{'marl:hasPolarity': 'marl:Positive'}],
|
||||
},
|
||||
'responses': [
|
||||
@@ -143,7 +144,7 @@ class TaigerPlugin3cats(SentimentPlugin):
|
||||
},
|
||||
'input': 'The pillow is in the wardrobe',
|
||||
'expected': {
|
||||
'sentiments': [
|
||||
'marl:hasOpinion': [
|
||||
{'marl:hasPolarity': 'marl:Neutral'}],
|
||||
},
|
||||
'responses': [
|
||||
|
@@ -38,7 +38,8 @@ class TaigerPlugin(SentimentPlugin):
|
||||
polarity = 'marl:Positive'
|
||||
return polarity
|
||||
|
||||
def analyse_entry(self, entry, params):
|
||||
def analyse_entry(self, entry, activity):
|
||||
params = activity.params
|
||||
|
||||
txt = entry['nif:isString']
|
||||
api = TAIGER_ENDPOINT
|
||||
@@ -77,7 +78,6 @@ class TaigerPlugin(SentimentPlugin):
|
||||
'expanded-jsonld': 0,
|
||||
'informat': 'text',
|
||||
'prefix': '',
|
||||
'plugin_type': 'analysisPlugin',
|
||||
'urischeme': 'RFC5147String',
|
||||
'outformat': 'json-ld',
|
||||
'conversion': 'full',
|
||||
@@ -87,7 +87,7 @@ class TaigerPlugin(SentimentPlugin):
|
||||
},
|
||||
'input': 'I hate to say this',
|
||||
'expected': {
|
||||
'sentiments': [
|
||||
'marl:hasOpinion': [
|
||||
{'marl:hasPolarity': 'marl:Negative'}],
|
||||
},
|
||||
'responses': [
|
||||
@@ -109,7 +109,6 @@ class TaigerPlugin(SentimentPlugin):
|
||||
'expanded-jsonld': 0,
|
||||
'informat': 'text',
|
||||
'prefix': '',
|
||||
'plugin_type': 'analysisPlugin',
|
||||
'urischeme': 'RFC5147String',
|
||||
'outformat': 'json-ld',
|
||||
'conversion': 'full',
|
||||
@@ -119,7 +118,7 @@ class TaigerPlugin(SentimentPlugin):
|
||||
},
|
||||
'input': 'This is amazing',
|
||||
'expected': {
|
||||
'sentiments': [
|
||||
'marl:hasOpinion': [
|
||||
{'marl:hasPolarity': 'marl:Positive'}],
|
||||
},
|
||||
'responses': [
|
||||
@@ -141,7 +140,6 @@ class TaigerPlugin(SentimentPlugin):
|
||||
'expanded-jsonld': 0,
|
||||
'informat': 'text',
|
||||
'prefix': '',
|
||||
'plugin_type': 'analysisPlugin',
|
||||
'urischeme': 'RFC5147String',
|
||||
'outformat': 'json-ld',
|
||||
'conversion': 'full',
|
||||
@@ -151,7 +149,7 @@ class TaigerPlugin(SentimentPlugin):
|
||||
},
|
||||
'input': 'The pillow is in the wardrobe',
|
||||
'expected': {
|
||||
'sentiments': [
|
||||
'marl:hasOpinion': [
|
||||
{'marl:hasPolarity': 'marl:Neutral'}],
|
||||
},
|
||||
'responses': [
|
||||
|
Reference in New Issue
Block a user