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()
Get the sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label.
|
com.azure.core.util.IterableStream<SentenceSentiment> |
getSentences()
Get a list of sentence sentiments.
|
TextSentiment |
getSentiment()
Get the text sentiment label: POSITIVE, NEGATIVE, NEUTRAL, or MIXED.
|
com.azure.core.util.IterableStream<TextAnalyticsWarning> |
getWarnings()
Get 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
.Copyright © 2021 Microsoft Corporation. All rights reserved.