Commit fad811a0 authored by J. Fernando Sánchez's avatar J. Fernando Sánchez

Update to senpy 0.20

parent 2e62459e
Pipeline #1419 failed with stages
in 1 second
......@@ -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': [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment