public class SentimentResponse extends Object implements Serializable
The sentiment expressed in an utterance.
When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field structure contains the result of the analysis.
| Constructor and Description |
|---|
SentimentResponse() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getSentimentLabel()
The inferred sentiment that Amazon Comprehend has the highest confidence
in.
|
String |
getSentimentScore()
The likelihood that the sentiment was correctly inferred.
|
int |
hashCode() |
void |
setSentimentLabel(String sentimentLabel)
The inferred sentiment that Amazon Comprehend has the highest confidence
in.
|
void |
setSentimentScore(String sentimentScore)
The likelihood that the sentiment was correctly inferred.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SentimentResponse |
withSentimentLabel(String sentimentLabel)
The inferred sentiment that Amazon Comprehend has the highest confidence
in.
|
SentimentResponse |
withSentimentScore(String sentimentScore)
The likelihood that the sentiment was correctly inferred.
|
public String getSentimentLabel()
The inferred sentiment that Amazon Comprehend has the highest confidence in.
The inferred sentiment that Amazon Comprehend has the highest confidence in.
public void setSentimentLabel(String sentimentLabel)
The inferred sentiment that Amazon Comprehend has the highest confidence in.
sentimentLabel - The inferred sentiment that Amazon Comprehend has the highest confidence in.
public SentimentResponse withSentimentLabel(String sentimentLabel)
The inferred sentiment that Amazon Comprehend has the highest confidence in.
Returns a reference to this object so that method calls can be chained together.
sentimentLabel - The inferred sentiment that Amazon Comprehend has the highest confidence in.
public String getSentimentScore()
The likelihood that the sentiment was correctly inferred.
The likelihood that the sentiment was correctly inferred.
public void setSentimentScore(String sentimentScore)
The likelihood that the sentiment was correctly inferred.
sentimentScore - The likelihood that the sentiment was correctly inferred.
public SentimentResponse withSentimentScore(String sentimentScore)
The likelihood that the sentiment was correctly inferred.
Returns a reference to this object so that method calls can be chained together.
sentimentScore - The likelihood that the sentiment was correctly inferred.
public String toString()
toString in class ObjectObject.toString()Copyright © 2019. All rights reserved.