Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
senpy
Taiger plugin
Commits
fad811a0
Commit
fad811a0
authored
Apr 04, 2019
by
J. Fernando Sánchez
Browse files
Update to senpy 0.20
parent
2e62459e
Pipeline
#1419
failed with stages
in 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
taiger3c_plugin.py
View file @
fad811a0
...
...
@@ -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'
:
[
...
...
taiger_plugin.py
View file @
fad811a0
...
...
@@ -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'
:
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment