Tasks
Sentiment Analysis
Score text on a scale of positive, negative, or neutral
Sentiment Analysis is the process of determining the emotional tone behind a series of words, used to gain an understanding of the attitudes, opinions and emotions expressed within an online mention.
Running Sentiment Analysis with supercontrast
is easy, all you have to do is provide the text and the provider you want to use.
In this example, we’ll specify that for Task.SENTIMENT_ANALYSIS
, we want to use Provider.AWS
, which uses Amazon’s Comprehend API.
Each task has its own request and response schema. For Task.SENTIMENT_ANALYSIS
, the request schema is defined by SentimentAnalysisRequest
and the response schema is defined by SentimentAnalysisResponse
.
text
: a string of the text to analyze for sentiment.
score
: a float between 0 and 1, representing the sentiment of the text.