Sentiment Analysis

Posted by

Determines the polarity of any text content: negative (neg), neutral (neu), positive (pos).

Supported Languages

Currently supporting the following languages (14): Arabic, Chinese, English, Farsi, French, German, Hungarian, Italian, Japanese, Polish, Portuguese, Romanian, Russian, Spanish.

Usage Example

This is an example of calling the Sentiment Analyzer on an English text using curl:

curl -X POST "http://localhost:8989/rest/process" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"content\": \"This phone has the worst fingerprint reader in years. It's slow, inaccurate, and brights up the entire room at night to try to use it.\", \"language\": \"eng\"}"

Calling the Sentiment Analyzer as above will generate the simple JSON response below:

  "label": "neg",
  "score": 0.7659167051315308

2 responses