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

Added meaningCloud to affect

This commit is contained in:
militarpancho
2017-01-16 17:11:10 +01:00
parent 864ca75b8f
commit 82e3062a6b
4 changed files with 33 additions and 10 deletions

View File

@@ -24,7 +24,8 @@ class DaedalusPlugin(SentimentPlugin):
model = params["model"] # general_es / general_es / general_fr
api = 'http://api.meaningcloud.com/sentiment-2.1'
lang = params.get("language")
key = os.environ.get('DAEDALUS_KEY')
#key = os.environ.get('DAEDALUS_KEY')
key = params["apiKey"]
parameters = {'key': key,'model': model,'lang': lang,'of': 'json','txt': txt,'src': 'its-not-a-real-python-sdk'}
r = requests.post(api, params=parameters)
print(r.text)

View File

@@ -17,6 +17,10 @@
"options": ["general"],
"default": "general"
}
"apiKey":{
"aliases":["meaningCloud-key"],
"required":true
}
},
"requirements": {},