Sentiment detection using a vocabulary or neural-network based approach.

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.

Endpointhttp://analytics.eventregistry.org/api/v1/sentiment
HeadersContent-Type: application/json

Use the vocabulary based approach to detecting the sentiment mentioned in the input text.

Request body

Parameters 
apiKey  string (required)

Your API key

text  string (required)

The text that will be used to calculate sentiment.

method  string

Approach used for detecting sentiment. The text that will be used to calculate sentiment.

Available values:  vocabulary, rnn
Default value:  vocabulary
sentences  integer

Number of sentences on which to compute the sentiment.

Default value:  10