mirror of
https://github.com/gsi-upm/senpy
synced 2025-08-24 02:22:20 +00:00
PEP8+Better JSON-LD support
* The API has also changed, there are new parameters to send the context as part of the headers. * Improved tests * PEP8 compliance (despite the line about gevent)
This commit is contained in:
@@ -11,8 +11,7 @@ class Sentiment140Plugin(SentimentPlugin):
|
||||
|
||||
p = params.get("prefix", None)
|
||||
response = Response(prefix=p)
|
||||
#polarity_value = self.maxPolarityValue*int(res.json()["data"][0]["polarity"]) * 0.25
|
||||
polarity_value = max(-1, min(1, random.gauss(0.2,0.2)))
|
||||
polarity_value = max(-1, min(1, random.gauss(0.2, 0.2)))
|
||||
polarity = "marl:Neutral"
|
||||
if polarity_value > 0:
|
||||
polarity = "marl:Positive"
|
||||
|
@@ -6,6 +6,7 @@
|
||||
"version": "0.1",
|
||||
"extra_params": {
|
||||
"language": {
|
||||
"@id": "lang_rand",
|
||||
"aliases": ["language", "l"],
|
||||
"required": false,
|
||||
"options": ["es", "en", "auto"]
|
||||
|
Reference in New Issue
Block a user