1

API Watson and API Alchemy, cannot be able to do sentiment analysis in Portuguese language, I did within two ways "keywords" and "sentiment" alone with URL, running very well with url english but not in Portuguese, only keywords and relevance return, however, the documentation says that it is possible, and in demo was possible.

response = nlu.analyze(url=url,features=[features.Keywords(limit=10,sentiment=True)])

response = alchemy_language.keywords(max_items=10, url=url, sentiment=1)
Sayuri Mizuguchi
  • 5,250
  • 3
  • 26
  • 53
Marco SC
  • 13
  • 5

2 Answers2

1

About Alchemy API, the languages are detectable automatically in each API call, or manually through the Language Detection method.

For automatic language detection to work best, it is recommend that you use source text with at least 100 characters.

To override language detection, pass the language query parameter with your desired language name in lowercase.

Method:

curl -X POST -d "language=spanish" ...

Check official documentation about that here.

Sayuri Mizuguchi
  • 5,250
  • 3
  • 26
  • 53
  • Thanks, but isn't the case it detects the language correctly and indentify the right keyword but is not able to do the sentiment analysis – Marco SC Mar 29 '17 at 00:21
  • In this case... I dont know if the Alchemy API work with portuguese language for get the sentiment, but, one solution is code for make conditions `If (sentiment === 'sad'){ analySent = "Triste"; }` I'll verify it and edit my answer. – Sayuri Mizuguchi Mar 29 '17 at 12:22
  • It does, I tested at demo site and it did the sentiment in portuguese without any trouble, however the API didn't do. – Marco SC Mar 29 '17 at 15:56
  • Sayuri, your example is about emotion, and emotion API Watson don't run in portuguese, in sentiment the output is the state like "positive" and the score. API bug is the most probable, I opened a ticked but you know their priority is not the same as our. – Marco SC Mar 29 '17 at 16:19
  • I understand, I've understood wrong, probably. But, in this case is just to how to get in portuguese language, is probable one bug. If I can help you with something, just say. – Sayuri Mizuguchi Mar 29 '17 at 16:29
  • In this case i knew the emotion dont run in portuguese, I understood that you can translate the sentiment, sorry e.e – Sayuri Mizuguchi Mar 29 '17 at 16:35
  • 1
    Feedback from IBM Bluemix - API Watson;" It looks like the developers believe these results to be a bug and they have opened an issue on this to get a fix on the schedule. There is currently no date set for the fix, but we continually update the services so it should make it to the service in the next several weeks." – Marco SC Apr 03 '17 at 16:34
0

There's at least 5 Sentiment Analysis APIs that support Portuguese:

They vastly differ in features and pricing. I would rever to this article for the detailed comparison.

savenkov
  • 658
  • 8
  • 13