FREE USAGE
daily calls limit: 500
The free multilingual sentiment analysis API from Chatterbox classifies short texts as positive or negative. The system uses advanced statistical models trained on social data, meaning the detection can handle slang, common misspellings, emoticons, hashtags, etc.
You can use this API for free. If you require more flexibility we have a paid for version here: www.mashape.com/apis/Sentiment+Analysis. Full details on the awesomeness of the API can be found at www.cbanalytics.co.uk/api
running
Methods
- classifytext
classifytext (POST)
This method determines the sentiment of a short text sequence. Given the text and a language parameter, it will return a positive/negative decision plus a sentiment value.
Parameters
lang
STRING
The two letter language code of the text you wish to submit. Accepted values are: "en" - English "es" - Spanish "pt" - Portuguese "fr" - French "nl" - Dutch "de" - German
For example: "en"
text
STRING
The text you wish to be classified. The maximum length is 300 characters. This string must be UTF-8 encoded (otherwise non-ascii characters will not be recognised properly).
For example: ""This is totally awesome :-)""
exclude(optional)
STRING
Any words you wish to exclude to avoid swaying the sentiment detection. This may be the name of a product for example. Enter a comma separated string.
For example: "badness,evil"
Results
sent
NUMBER
This is a label marking the sentiment class of the text. 1 is positive, -1 is negative. These should be interpreted along with the value parameter.
For example: "1"
value
NUMBER
This expresses the strength of the sentiment, in the range of -1.0 to 1.0. Neutral sentiment is around 0.0.
For example: "0.85"
Errors
Error
OBJECT
message
STRING
Value: "Unsupported language"
code
NUMBER
Value: "1"
Example
JSON
{"sent":1,"value":0.85}
