Analyze the messages

Comprehend provides multiple text-based machine learning models out of the box. Now that you’ve seen the input data you’ll be working with, take a look at what Amazon Comprehend can tell you about your data.

  1. Navigate to Amazon Comprehend console.

  2. Click Launch Amazon Comprehend.

  3. Copy the first message from the README.md file and paste it into the Input text box in the Amazon Comprehend console. Then, click Analyze.

  4. Take a look at the different tabs under Insights. This will give you a sense of the options you get out of the box from Amazon Comprehend. The main tab you care about now is Sentiment.

This view gives you multiple helpful pieces of information that will be useful as you build your sentiment monitoring application. First, take a look at the results. There are four different types of sentiment: neutral, positive, negative and mixed. And each of these sentiments gets a confidence score. Think of this score as the probability that the input text belongs to the defined sentiment. So for the input text “it’s not ez”, there is an 88% chance that the text is neutral, according to the underlying machine learning model.

Under the Application Integration section, you can see the structure of the request and response. The Sentiment attribute in the response is the most likely sentiment for the message. The SentimentScore object exposes the confidence scores for each of the sentiment classes.

Copy the rest of the messages from README.md one at a time, analyze them in the Comprehend console and observe the results.

In addition to sentiment detection, Amazon Comprehend’s real-time APIs can automatically understand entities (you can imagine monitoring entities in chats when a new boss is placed in a game), key phrases, language and syntax out of the box.