public final class SentenceSentiment extends Object
SentenceSentiment model that contains a sentiment label of a sentence, confidence scores of the
sentiment label, sentence opinions, and offset of sentence within a document.| Constructor and Description |
|---|
SentenceSentiment(String text,
TextSentiment sentiment,
SentimentConfidenceScores confidenceScores)
Creates a
SentenceSentiment model that describes the sentiment analysis of sentence. |
| Modifier and Type | Method and Description |
|---|---|
SentimentConfidenceScores |
getConfidenceScores()
Gets the confidence score of the sentiment label.
|
int |
getLength()
Gets the length of sentence.
|
int |
getOffset()
Gets the offset of sentence.
|
com.azure.core.util.IterableStream<SentenceOpinion> |
getOpinions()
Gets the sentence opinions of sentence sentiment.
|
TextSentiment |
getSentiment()
Gets the text sentiment label: POSITIVE, NEGATIVE, or NEUTRAL.
|
String |
getText()
Gets the sentence text property.
|
public SentenceSentiment(String text, TextSentiment sentiment, SentimentConfidenceScores confidenceScores)
SentenceSentiment model that describes the sentiment analysis of sentence.text - The sentence text.sentiment - The sentiment label of the sentence.confidenceScores - The sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label.
Higher values signify higher confidence.public String getText()
public TextSentiment getSentiment()
TextSentiment.public SentimentConfidenceScores getConfidenceScores()
SentimentConfidenceScores.public com.azure.core.util.IterableStream<SentenceOpinion> getOpinions()
public int getOffset()
public int getLength()
Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.