Class AssessmentSentiment
java.lang.Object
com.azure.ai.textanalytics.models.AssessmentSentiment
The
AssessmentSentiment model.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the confidence score of the sentiment label.intGets the length of opinion text.intGets the offset of opinion text.Gets the opinion text sentiment label: POSITIVE, NEGATIVE, MIXED.getText()Gets the opinion text property.booleanGets the boolean indicator to show if the text is negative.
-
Constructor Details
-
AssessmentSentiment
public AssessmentSentiment()Constructs aAssessmentSentimentmodel.
-
-
Method Details
-
getText
Gets the opinion text property.- Returns:
- The text value.
-
getSentiment
Gets the opinion text sentiment label: POSITIVE, NEGATIVE, MIXED.TextSentimenthasneutralsentiment type additionally, but target sentiment can only be positive, negative, or mixed.- Returns:
- The sentiment value.
-
getOffset
public int getOffset()Gets the offset of opinion text.- Returns:
- The offset of opinion text.
-
getLength
public int getLength()Gets the length of opinion text.- Returns:
- The length of opinion text.
-
isNegated
public boolean isNegated()Gets the boolean indicator to show if the text is negative.- Returns:
- The boolean indicator to show if the text is negative.
-
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.AssessmentSentimentonly has positive or negative confidence score value because there is no neutral sentiment label in theAssessmentSentiment.- Returns:
- The
SentimentConfidenceScores.
-