Hi,
I am currently using python's wrapper to perform sentiment analysis on already collected data from twitter. Note that most of the tweets are in german. I would like to perform a targeted analysis with the following parameters:
alchemyapi.sentiment_targeted('text', tweet, 'fluchtling')
FIY: fluchtling means refugee. With tweet being:
'RT @BVB: In den Farben getrennt, in der Sache vereint, @s04! #refugeeswelcome https://t.co/epSvODvUG3'
Running this I get the following error:
alchemyapi.sentiment_targeted('text', tweet, 'fluchtling')
<Response [200]>
Expecting property name enclosed in double quotes: line 6 column 1 (char 273)
Out[133]: {'status': 'ERROR', 'statusInfo': 'parse-error'}
I have also tried using 'refugee' as target and still got the error message.
I can run the example for sentiment_targeted without getting any error message:
demo_text = 'Yesterday dumb Bob destroyed my fancy iPhone in beautiful Denver, Colorado. I guess I will have to head over to the Apple Store and buy a new one.'
response = alchemyapi.sentiment_targeted('text', demo_text, 'Denver')
response
Out[139]:
{u'docSentiment': {u'score': u'-0.508233', u'type': u'negative'},
u'language': u'english',
u'status': u'OK',
u'totalTransactions': u'1',
u'usage': u'By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html'}
Has anyone ever experienced this issue? Or knows what could cause it? From my understanding it seems to be an error message create while bluemix converts the json file to python format.
Thanks,