Sentiment
Sentiment detection using a vocabulary or neural-network based approach.
BodyJSON, with Content-Type: application/json. GET with query parameters also works.
Examples
Sentiment with the vocabulary-based method
Use the vocabulary based approach to detecting the sentiment mentioned in the input text.
Sentiment with the neural network method
Use the neural-network based approach to detecting the sentiment mentioned in the input text.
How it works
Compute the sentiment expressed in the text. Depending on your preference you can use the vocabulary based approach, which assigns sentiment based on the sentiment values that are preassigned to individual words, or the neural-network based approach.
The returned response contains an average sentiment of the text as well as sentence by sentence sentiment. The sentiment will range between -1 (very negative) and 1 (very positive).
Please note that the sentiment classification only works on documents in English language.
Parameters
Send them in the JSON body; the same names work as GET query parameters.
Core
4
Default: vocabulary
Values: vocabulary rnn
Default: 10
Response
Example output is a real response; Output schema lists the fields the endpoint can return.
- avgSentdouble
- sentimentPerSentdouble[]
On this page
Build this request with a form and run it with your API key.
OpenAPI specification