Class TargetSentiment
java.lang.Object
com.azure.ai.textanalytics.models.TargetSentiment
The
TargetSentiment model.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the confidence score of the sentiment label.intGets the length of target text.intGets the target text offset from the start of document.Gets the target text sentiment label: POSITIVE, NEGATIVE, MIXED.getText()Gets the target text property.
-
Constructor Details
-
TargetSentiment
public TargetSentiment()Constructs aTargetSentimentmodel.
-
-
Method Details
-
getText
Gets the target text property.- Returns:
- The text value.
-
getSentiment
Gets the target text sentiment label: POSITIVE, NEGATIVE, MIXED.TextSentimenthas NEUTRAL sentiment type additionally, but target sentiment can only be POSITIVE, NEGATIVE, or MIXED.- Returns:
- The sentiment value.
-
getOffset
public int getOffset()Gets the target text offset from the start of document.- Returns:
- The target text offset from the start of document.
-
getLength
public int getLength()Gets the length of target text.- Returns:
- The length of target text.
-
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. AspectSentiment only has positive or negative confidence score value because there is no neutral sentiment label in the AspectSentiment.- Returns:
- The
SentimentConfidenceScores.
-