Class DocumentSentiment
java.lang.Object
com.azure.ai.textanalytics.models.DocumentSentiment
The
DocumentSentiment model that contains sentiment label of a document, confidence score of the
sentiment label, and a list of SentenceSentiment.-
Constructor Summary
ConstructorsConstructorDescriptionDocumentSentiment(TextSentiment sentiment, SentimentConfidenceScores confidenceScores, com.azure.core.util.IterableStream<SentenceSentiment> sentences, com.azure.core.util.IterableStream<TextAnalyticsWarning> warnings) Creates aDocumentSentimentmodel that describes the sentiment of the document. -
Method Summary
Modifier and TypeMethodDescriptionGets the sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label.com.azure.core.util.IterableStream<SentenceSentiment>Gets a list of sentence sentiments.Gets the text sentiment label: POSITIVE, NEGATIVE, NEUTRAL, or MIXED.com.azure.core.util.IterableStream<TextAnalyticsWarning>Gets theIterableStreamofText Analytics warnings.
-
Constructor Details
-
DocumentSentiment
public DocumentSentiment(TextSentiment sentiment, SentimentConfidenceScores confidenceScores, com.azure.core.util.IterableStream<SentenceSentiment> sentences, com.azure.core.util.IterableStream<TextAnalyticsWarning> warnings) Creates aDocumentSentimentmodel that describes the sentiment of the document.- Parameters:
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- AnIterableStreamof sentence sentiments.warnings- AnIterableStreamofTextAnalyticsWarning.
-
-
Method Details
-
getSentiment
Gets the text sentiment label: POSITIVE, NEGATIVE, NEUTRAL, or MIXED.- Returns:
- The
TextSentiment.
-
getConfidenceScores
Gets the sentiment confidence score (Softmax score) between 0 and 1, for each sentiment label. Higher values signify higher confidence.- Returns:
- The
SentimentConfidenceScores.
-
getSentences
Gets a list of sentence sentiments.- Returns:
- A list of sentence sentiments.
-
getWarnings
Gets theIterableStreamofText Analytics warnings.- Returns:
- An
IterableStreamofTextAnalyticsWarning.
-