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
ConstructorDescriptionDocumentSentiment
(TextSentiment sentiment, SentimentConfidenceScores confidenceScores, IterableStream<SentenceSentiment> sentences, IterableStream<TextAnalyticsWarning> warnings) Creates aDocumentSentiment
model 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.Gets a list of sentence sentiments.Gets the text sentiment label: POSITIVE, NEGATIVE, NEUTRAL, or MIXED.Gets theIterableStream
ofText Analytics warnings
.
-
Constructor Details
-
DocumentSentiment
public DocumentSentiment(TextSentiment sentiment, SentimentConfidenceScores confidenceScores, IterableStream<SentenceSentiment> sentences, IterableStream<TextAnalyticsWarning> warnings) Creates aDocumentSentiment
model 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
- AnIterableStream
of sentence sentiments.warnings
- AnIterableStream
ofTextAnalyticsWarning
.
-
-
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 theIterableStream
ofText Analytics warnings
.- Returns:
- An
IterableStream
ofTextAnalyticsWarning
.
-