AnalyzeSentimentResult Class

AnalyzeSentimentResult is a result object which contains the overall predicted sentiment and confidence scores for your document and a per-sentence sentiment prediction with scores.

Inheritance
azure.ai.textanalytics._models.DictMixin
AnalyzeSentimentResult

Constructor

AnalyzeSentimentResult(**kwargs)

Variables

id
str

Unique, non-empty document identifier that matches the document id that was passed in with the request. If not specified in the request, an id is assigned for the document.

sentiment
str

Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Possible values include: 'positive', 'neutral', 'negative', 'mixed'

warnings
list[TextAnalyticsWarning]

Warnings encountered while processing document. Results will still be returned if there are warnings, but they may not be fully accurate.

statistics
TextDocumentStatistics

If show_stats=True was specified in the request this field will contain information about the document payload.

confidence_scores
SentimentConfidenceScores

Document level sentiment confidence scores between 0 and 1 for each sentiment label.

sentences
list[SentenceSentiment]

Sentence level sentiment analysis.

is_error
bool

Boolean check for error item when iterating over list of results. Always False for an instance of a AnalyzeSentimentResult.