1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-23 18:12:20 +00:00

Better jsonld support

This commit is contained in:
J. Fernando Sánchez
2014-11-27 10:51:00 +01:00
parent 2f7a8d7267
commit 2834967026
7 changed files with 61 additions and 34 deletions

View File

@@ -36,7 +36,7 @@ class Sentiment140Plugin(SentimentPlugin):
elif polarity_value < 50:
polarity = "marl:Negative"
entry = Entry(text=params["input"])
opinion = Opinion(polarity=polarity, polarity_value=polarity_value)
opinion = Opinion(hasPolarity=polarity, polarityValue=polarity_value)
entry.opinions.append(opinion)
entry.language = lang
response.entries.append(entry)