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."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eTextSentimentAnnotation\u003c/code\u003e class within the Google AutoML v1 API, detailing its structure and functionality.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTextSentimentAnnotation\u003c/code\u003e is used to store annotation details specific to text sentiment and is part of the \u003ccode\u003eGoogle.Cloud.AutoML.V1\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextSentimentAnnotation\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from \u003ccode\u003eObject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class has a \u003ccode\u003eSentiment\u003c/code\u003e property of type \u003ccode\u003eInt32\u003c/code\u003e, which represents the sentiment value, with higher values indicating more positive sentiment, relative to the training data.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation provides access to versions ranging from 2.2.0 up to the current latest 3.4.0 version of the API.\u003c/p\u003e\n"]]],[],null,[]]