Debian Codegraph @

automl/apiv1beta1/automlpb/text_sentiment.pb.go

raw
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.35.2
18 // protoc v4.25.7
19 // source: google/cloud/automl/v1beta1/text_sentiment.proto
20
21 package automlpb
22
23 import (
24 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
25 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
26 reflect "reflect"
27 sync "sync"
28 )
29
30 const (
31 // Verify that this generated code is sufficiently up-to-date.
32 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
33 // Verify that runtime/protoimpl is sufficiently up-to-date.
34 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
35 )
36
37 // Contains annotation details specific to text sentiment.
38 type TextSentimentAnnotation struct {
39 state protoimpl.MessageState
40 sizeCache protoimpl.SizeCache
41 unknownFields protoimpl.UnknownFields
42
43 // Output only. The sentiment with the semantic, as given to the
44 // [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
45 // for the prediction had been trained.
46 // The sentiment values are between 0 and
47 // Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
48 // with higher value meaning more positive sentiment. They are completely
49 // relative, i.e. 0 means least positive sentiment and sentiment_max means
50 // the most positive from the sentiments present in the train data. Therefore
51 //
52 // e.g. if train data had only negative sentiment, then sentiment_max, would
53 //
54 // be still negative (although least negative).
55 // The sentiment shouldn't be confused with "score" or "magnitude"
56 // from the previous Natural Language Sentiment Analysis API.
57 Sentiment int32 `protobuf:"varint,1,opt,name=sentiment,proto3" json:"sentiment,omitempty"`
58 }
59
60 func (x *TextSentimentAnnotation) Reset() {
61 *x = TextSentimentAnnotation{}
62 mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0]
63 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
64 ms.StoreMessageInfo(mi)
65 }
66
67 func (x *TextSentimentAnnotation) String() string {
68 return protoimpl.X.MessageStringOf(x)
69 }
70
71 func (*TextSentimentAnnotation) ProtoMessage() {}
72
73 func (x *TextSentimentAnnotation) ProtoReflect() protoreflect.Message {
74 mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0]
75 if x != nil {
76 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
77 if ms.LoadMessageInfo() == nil {
78 ms.StoreMessageInfo(mi)
79 }
80 return ms
81 }
82 return mi.MessageOf(x)
83 }
84
85 // Deprecated: Use TextSentimentAnnotation.ProtoReflect.Descriptor instead.
86 func (*TextSentimentAnnotation) Descriptor() ([]byte, []int) {
87 return file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescGZIP(), []int{0}
88 }
89
90 func (x *TextSentimentAnnotation) GetSentiment() int32 {
91 if x != nil {
92 return x.Sentiment
93 }
94 return 0
95 }
96
97 // Model evaluation metrics for text sentiment problems.
98 type TextSentimentEvaluationMetrics struct {
99 state protoimpl.MessageState
100 sizeCache protoimpl.SizeCache
101 unknownFields protoimpl.UnknownFields
102
103 // Output only. Precision.
104 Precision float32 `protobuf:"fixed32,1,opt,name=precision,proto3" json:"precision,omitempty"`
105 // Output only. Recall.
106 Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"`
107 // Output only. The harmonic mean of recall and precision.
108 F1Score float32 `protobuf:"fixed32,3,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"`
109 // Output only. Mean absolute error. Only set for the overall model
110 // evaluation, not for evaluation of a single annotation spec.
111 MeanAbsoluteError float32 `protobuf:"fixed32,4,opt,name=mean_absolute_error,json=meanAbsoluteError,proto3" json:"mean_absolute_error,omitempty"`
112 // Output only. Mean squared error. Only set for the overall model
113 // evaluation, not for evaluation of a single annotation spec.
114 MeanSquaredError float32 `protobuf:"fixed32,5,opt,name=mean_squared_error,json=meanSquaredError,proto3" json:"mean_squared_error,omitempty"`
115 // Output only. Linear weighted kappa. Only set for the overall model
116 // evaluation, not for evaluation of a single annotation spec.
117 LinearKappa float32 `protobuf:"fixed32,6,opt,name=linear_kappa,json=linearKappa,proto3" json:"linear_kappa,omitempty"`
118 // Output only. Quadratic weighted kappa. Only set for the overall model
119 // evaluation, not for evaluation of a single annotation spec.
120 QuadraticKappa float32 `protobuf:"fixed32,7,opt,name=quadratic_kappa,json=quadraticKappa,proto3" json:"quadratic_kappa,omitempty"`
121 // Output only. Confusion matrix of the evaluation.
122 // Only set for the overall model evaluation, not for evaluation of a single
123 // annotation spec.
124 ConfusionMatrix *ClassificationEvaluationMetrics_ConfusionMatrix `protobuf:"bytes,8,opt,name=confusion_matrix,json=confusionMatrix,proto3" json:"confusion_matrix,omitempty"`
125 // Output only. The annotation spec ids used for this evaluation.
126 // Deprecated .
127 //
128 // Deprecated: Marked as deprecated in google/cloud/automl/v1beta1/text_sentiment.proto.
129 AnnotationSpecId []string `protobuf:"bytes,9,rep,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"`
130 }
131
132 func (x *TextSentimentEvaluationMetrics) Reset() {
133 *x = TextSentimentEvaluationMetrics{}
134 mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1]
135 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
136 ms.StoreMessageInfo(mi)
137 }
138
139 func (x *TextSentimentEvaluationMetrics) String() string {
140 return protoimpl.X.MessageStringOf(x)
141 }
142
143 func (*TextSentimentEvaluationMetrics) ProtoMessage() {}
144
145 func (x *TextSentimentEvaluationMetrics) ProtoReflect() protoreflect.Message {
146 mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1]
147 if x != nil {
148 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
149 if ms.LoadMessageInfo() == nil {
150 ms.StoreMessageInfo(mi)
151 }
152 return ms
153 }
154 return mi.MessageOf(x)
155 }
156
157 // Deprecated: Use TextSentimentEvaluationMetrics.ProtoReflect.Descriptor instead.
158 func (*TextSentimentEvaluationMetrics) Descriptor() ([]byte, []int) {
159 return file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescGZIP(), []int{1}
160 }
161
162 func (x *TextSentimentEvaluationMetrics) GetPrecision() float32 {
163 if x != nil {
164 return x.Precision
165 }
166 return 0
167 }
168
169 func (x *TextSentimentEvaluationMetrics) GetRecall() float32 {
170 if x != nil {
171 return x.Recall
172 }
173 return 0
174 }
175
176 func (x *TextSentimentEvaluationMetrics) GetF1Score() float32 {
177 if x != nil {
178 return x.F1Score
179 }
180 return 0
181 }
182
183 func (x *TextSentimentEvaluationMetrics) GetMeanAbsoluteError() float32 {
184 if x != nil {
185 return x.MeanAbsoluteError
186 }
187 return 0
188 }
189
190 func (x *TextSentimentEvaluationMetrics) GetMeanSquaredError() float32 {
191 if x != nil {
192 return x.MeanSquaredError
193 }
194 return 0
195 }
196
197 func (x *TextSentimentEvaluationMetrics) GetLinearKappa() float32 {
198 if x != nil {
199 return x.LinearKappa
200 }
201 return 0
202 }
203
204 func (x *TextSentimentEvaluationMetrics) GetQuadraticKappa() float32 {
205 if x != nil {
206 return x.QuadraticKappa
207 }
208 return 0
209 }
210
211 func (x *TextSentimentEvaluationMetrics) GetConfusionMatrix() *ClassificationEvaluationMetrics_ConfusionMatrix {
212 if x != nil {
213 return x.ConfusionMatrix
214 }
215 return nil
216 }
217
218 // Deprecated: Marked as deprecated in google/cloud/automl/v1beta1/text_sentiment.proto.
219 func (x *TextSentimentEvaluationMetrics) GetAnnotationSpecId() []string {
220 if x != nil {
221 return x.AnnotationSpecId
222 }
223 return nil
224 }
225
226 var File_google_cloud_automl_v1beta1_text_sentiment_proto protoreflect.FileDescriptor
227
228 var file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDesc = []byte{
229 0x0a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61,
230 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65,
231 0x78, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f,
232 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
233 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a,
234 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75,
235 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x61,
236 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
237 0x6f, 0x22, 0x37, 0x0a, 0x17, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65,
238 0x6e, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
239 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
240 0x09, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xc6, 0x03, 0x0a, 0x1e, 0x54,
241 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x61, 0x6c,
242 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1c, 0x0a,
243 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02,
244 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72,
245 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x72, 0x65, 0x63,
246 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18,
247 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2e,
248 0x0a, 0x13, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x5f,
249 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x6d, 0x65, 0x61,
250 0x6e, 0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2c,
251 0x0a, 0x12, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x65,
252 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x6d, 0x65, 0x61, 0x6e,
253 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c,
254 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x6b, 0x61, 0x70, 0x70, 0x61, 0x18, 0x06, 0x20, 0x01,
255 0x28, 0x02, 0x52, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x4b, 0x61, 0x70, 0x70, 0x61, 0x12,
256 0x27, 0x0a, 0x0f, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6b, 0x61, 0x70,
257 0x70, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61,
258 0x74, 0x69, 0x63, 0x4b, 0x61, 0x70, 0x70, 0x61, 0x12, 0x77, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66,
259 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01,
260 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75,
261 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
262 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
263 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
264 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78,
265 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69,
266 0x78, 0x12, 0x30, 0x0a, 0x12, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
267 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18,
268 0x01, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65,
269 0x63, 0x49, 0x64, 0x42, 0xad, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
270 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e,
271 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x12, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e,
272 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x37, 0x63, 0x6c, 0x6f,
273 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f,
274 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74,
275 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x70, 0x62, 0x3b, 0x61, 0x75, 0x74, 0x6f,
276 0x6d, 0x6c, 0x70, 0x62, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c,
277 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74,
278 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f,
279 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65,
280 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
281 }
282
283 var (
284 file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescOnce sync.Once
285 file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescData = file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDesc
286 )
287
288 func file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescGZIP() []byte {
289 file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescOnce.Do(func() {
290 file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescData)
291 })
292 return file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescData
293 }
294
295 var file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
296 var file_google_cloud_automl_v1beta1_text_sentiment_proto_goTypes = []any{
297 (*TextSentimentAnnotation)(nil), // 0: google.cloud.automl.v1beta1.TextSentimentAnnotation
298 (*TextSentimentEvaluationMetrics)(nil), // 1: google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics
299 (*ClassificationEvaluationMetrics_ConfusionMatrix)(nil), // 2: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix
300 }
301 var file_google_cloud_automl_v1beta1_text_sentiment_proto_depIdxs = []int32{
302 2, // 0: google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.confusion_matrix:type_name -> google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix
303 1, // [1:1] is the sub-list for method output_type
304 1, // [1:1] is the sub-list for method input_type
305 1, // [1:1] is the sub-list for extension type_name
306 1, // [1:1] is the sub-list for extension extendee
307 0, // [0:1] is the sub-list for field type_name
308 }
309
310 func init() { file_google_cloud_automl_v1beta1_text_sentiment_proto_init() }
311 func file_google_cloud_automl_v1beta1_text_sentiment_proto_init() {
312 if File_google_cloud_automl_v1beta1_text_sentiment_proto != nil {
313 return
314 }
315 file_google_cloud_automl_v1beta1_classification_proto_init()
316 type x struct{}
317 out := protoimpl.TypeBuilder{
318 File: protoimpl.DescBuilder{
319 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
320 RawDescriptor: file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDesc,
321 NumEnums: 0,
322 NumMessages: 2,
323 NumExtensions: 0,
324 NumServices: 0,
325 },
326 GoTypes: file_google_cloud_automl_v1beta1_text_sentiment_proto_goTypes,
327 DependencyIndexes: file_google_cloud_automl_v1beta1_text_sentiment_proto_depIdxs,
328 MessageInfos: file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes,
329 }.Build()
330 File_google_cloud_automl_v1beta1_text_sentiment_proto = out.File
331 file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDesc = nil
332 file_google_cloud_automl_v1beta1_text_sentiment_proto_goTypes = nil
333 file_google_cloud_automl_v1beta1_text_sentiment_proto_depIdxs = nil
334 }