NAME
Google::Cloud::Automl::V1::TextSentiment - Compiled Protocol Buffers messages for google/cloud/automl/v1/text_sentiment.proto
SYNOPSIS
use Google::Cloud::Automl::V1::TextSentiment;
my $msg = Google::Cloud::Automl::V1::TextSentiment::TextSentimentAnnotation->new({
sentiment => $sentiment,
});
# Read or update a field
my $val = $msg->sentiment();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Automl::V1::TextSentiment::TextSentimentAnnotation->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/automl/v1/text_sentiment.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Automl::V1::TextSentiment::TextSentimentAnnotation
Contains annotation details specific to text sentiment.
Inherits from Protobuf::Message.
Accessors
$msg->sentiment()/$msg->sentiment($value)Type:
Int32Output 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.
Google::Cloud::Automl::V1::TextSentiment::TextSentimentEvaluationMetrics
Model evaluation metrics for text sentiment problems.
Inherits from Protobuf::Message.
Accessors
$msg->precision()/$msg->precision($value)Type:
FloatOutput only. Precision.
$msg->recall()/$msg->recall($value)Type:
FloatOutput only. Recall.
$msg->f1_score()/$msg->f1_score($value)Type:
FloatOutput only. The harmonic mean of recall and precision.
$msg->mean_absolute_error()/$msg->mean_absolute_error($value)Type:
FloatOutput only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.
$msg->mean_squared_error()/$msg->mean_squared_error($value)Type:
FloatOutput only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.
$msg->linear_kappa()/$msg->linear_kappa($value)Type:
FloatOutput only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.
$msg->quadratic_kappa()/$msg->quadratic_kappa($value)Type:
FloatOutput only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.
$msg->confusion_matrix()/$msg->confusion_matrix($value)Type:
Message(Google::Cloud::Automl::V1::Classification::ClassificationEvaluationMetrics::ConfusionMatrix)Output only. Confusion matrix of the evaluation. Only set for the overall model evaluation, not for evaluation of a single annotation spec.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Automl::V1::TextSentiment::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.