AssessmentSentiment Class
- java.
lang. Object - com.
azure. ai. textanalytics. models. AssessmentSentiment
- com.
public final class AssessmentSentiment
The AssessmentSentiment model.
Constructor Summary
| Constructor | Description |
|---|---|
| AssessmentSentiment() |
Constructs a |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Sentiment |
getConfidenceScores()
Gets the confidence score of the sentiment label. |
| int |
getLength()
Gets the length of opinion text. |
| int |
getOffset()
Gets the offset of opinion text. |
|
Text |
getSentiment()
Gets the opinion text sentiment label: POSITIVE, NEGATIVE, MIXED. |
| String |
getText()
Gets the opinion text property. |
| boolean |
isNegated()
Gets the boolean indicator to show if the text is negative. |
Methods inherited from java.lang.Object
Constructor Details
AssessmentSentiment
public AssessmentSentiment()
Constructs a AssessmentSentiment model.
Method Details
getConfidenceScores
public SentimentConfidenceScores getConfidenceScores()
Gets the confidence score of the sentiment label. All score values sum up to 1, the higher the score, the higher the confidence in the sentiment. AssessmentSentiment only has positive or negative confidence score value because there is no neutral sentiment label in the AssessmentSentiment.
Returns:
getLength
public int getLength()
Gets the length of opinion text.
Returns:
getOffset
public int getOffset()
Gets the offset of opinion text.
Returns:
getSentiment
public TextSentiment getSentiment()
Gets the opinion text sentiment label: POSITIVE, NEGATIVE, MIXED. TextSentiment has neutral sentiment type additionally, but target sentiment can only be positive, negative, or mixed.
Returns:
getText
public String getText()
Gets the opinion text property.
Returns:
isNegated
public boolean isNegated()
Gets the boolean indicator to show if the text is negative.
Returns: