public sealed class TextSentimentAnnotation : IMessage<TextSentimentAnnotation>, IEquatable<TextSentimentAnnotation>, IDeepCloneable<TextSentimentAnnotation>, IBufferMessage, IMessage
Reference documentation and code samples for the Google AutoML v1 API class TextSentimentAnnotation.
Contains annotation details specific to text sentiment.
Output only. The sentiment with the semantic, as given to the
[AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData] when populating the dataset from which the model used
for the prediction had been trained.
The sentiment values are between 0 and
Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
with higher value meaning more positive sentiment. They are completely
relative, i.e. 0 means least positive sentiment and sentiment_max means
the most positive from the sentiments present in the train data. Therefore
e.g. if train data had only negative sentiment, then sentiment_max, would
be still negative (although least negative).
The sentiment shouldn't be confused with "score" or "magnitude"
from the previous Natural Language Sentiment Analysis API.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["The `TextSentimentAnnotation` class in the Google AutoML v1 API provides details about text sentiment and is the main focus of this documentation page."],["This class contains a `Sentiment` property, an integer representing the level of positive sentiment, ranging from 0 to `sentiment_max` and is completely relative to the data used for training."],["The `TextSentimentAnnotation` class is a concrete implementation of several interfaces, including `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`, as well as a derived type of object."],["The latest version of the `TextSentimentAnnotation` class is 3.4.0, with multiple previous versions available."],["`TextSentimentAnnotation` has two constructors, a default one with no arguments and one which takes another `TextSentimentAnnotation` as an argument."]]],[]]