public final class DocumentSentiment extends Object
DocumentSentiment model that contains sentiment label of a document, confidence score of the
sentiment label, and a list of SentenceSentiment.| Constructor and Description |
|---|
DocumentSentiment(TextSentiment sentiment,
SentimentConfidenceScores confidenceScores,
com.azure.core.util.IterableStream<SentenceSentiment> sentences,
com.azure.core.util.IterableStream<TextAnalyticsWarning> warnings)
Creates a
DocumentSentiment model that describes the sentiment of the document. |
| Modifier and Type | Method and Description |
|---|---|
SentimentConfidenceScores |
getConfidenceScores()
Gets the sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label.
|
com.azure.core.util.IterableStream<SentenceSentiment> |
getSentences()
Gets a list of sentence sentiments.
|
TextSentiment |
getSentiment()
Gets the text sentiment label: POSITIVE, NEGATIVE, NEUTRAL, or MIXED.
|
com.azure.core.util.IterableStream<TextAnalyticsWarning> |
getWarnings()
Gets the
IterableStream of Text Analytics warnings. |
public DocumentSentiment(TextSentiment sentiment, SentimentConfidenceScores confidenceScores, com.azure.core.util.IterableStream<SentenceSentiment> sentences, com.azure.core.util.IterableStream<TextAnalyticsWarning> warnings)
DocumentSentiment model that describes the sentiment of the document.sentiment - The sentiment label of the document.confidenceScores - The sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label.
Higher values signify higher confidence.sentences - An IterableStream of sentence sentiments.warnings - An IterableStream of TextAnalyticsWarning.public TextSentiment getSentiment()
TextSentiment.public SentimentConfidenceScores getConfidenceScores()
SentimentConfidenceScores.public com.azure.core.util.IterableStream<SentenceSentiment> getSentences()
public com.azure.core.util.IterableStream<TextAnalyticsWarning> getWarnings()
IterableStream of Text Analytics warnings.IterableStream of TextAnalyticsWarning.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.