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._dict_mixin.DictMixinAnalyzeSentimentResult
Constructor
AnalyzeSentimentResult(**kwargs: Any)
Methods
get | |
has_key | |
items | |
keys | |
update | |
values |
get
get(key: str, default: Any | None = None) -> Any
Parameters
Name | Description |
---|---|
key
Required
|
|
default
|
Default value: None
|
has_key
has_key(k: str) -> bool
Parameters
Name | Description |
---|---|
k
Required
|
|
items
items() -> Iterable[Tuple[str, Any]]
keys
keys() -> Iterable[str]
update
update(*args: Any, **kwargs: Any) -> None
values
values() -> Iterable[Any]
Attributes
confidence_scores
Document level sentiment confidence scores between 0 and 1 for each sentiment label.
confidence_scores: SentimentConfidenceScores
id
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.
id: str
is_error
Boolean check for error item when iterating over list of results. Always False for an instance of a AnalyzeSentimentResult.
is_error: Literal[False] = False
kind
The text analysis kind - "SentimentAnalysis".
kind: Literal['SentimentAnalysis'] = 'SentimentAnalysis'
sentences
Sentence level sentiment analysis.
sentences: List[SentenceSentiment]
sentiment
Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Possible values include 'positive', 'neutral', 'negative', 'mixed'
sentiment: str
statistics
If show_stats=True was specified in the request this field will contain information about the document payload.
statistics: TextDocumentStatistics | None = None
warnings
Warnings encountered while processing document. Results will still be returned if there are warnings, but they may not be fully accurate.
warnings: List[TextAnalyticsWarning]
Azure SDK for Python