Debian Codegraph @

automl/apiv1/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/v1/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.v1.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_v1_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_v1_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_v1_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 }
126
127 func (x *TextSentimentEvaluationMetrics) Reset() {
128 *x = TextSentimentEvaluationMetrics{}
129 mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1]
130 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
131 ms.StoreMessageInfo(mi)
132 }
133
134 func (x *TextSentimentEvaluationMetrics) String() string {
135 return protoimpl.X.MessageStringOf(x)
136 }
137
138 func (*TextSentimentEvaluationMetrics) ProtoMessage() {}
139
140 func (x *TextSentimentEvaluationMetrics) ProtoReflect() protoreflect.Message {
141 mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1]
142 if x != nil {
143 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
144 if ms.LoadMessageInfo() == nil {
145 ms.StoreMessageInfo(mi)
146 }
147 return ms
148 }
149 return mi.MessageOf(x)
150 }
151
152 // Deprecated: Use TextSentimentEvaluationMetrics.ProtoReflect.Descriptor instead.
153 func (*TextSentimentEvaluationMetrics) Descriptor() ([]byte, []int) {
154 return file_google_cloud_automl_v1_text_sentiment_proto_rawDescGZIP(), []int{1}
155 }
156
157 func (x *TextSentimentEvaluationMetrics) GetPrecision() float32 {
158 if x != nil {
159 return x.Precision
160 }
161 return 0
162 }
163
164 func (x *TextSentimentEvaluationMetrics) GetRecall() float32 {
165 if x != nil {
166 return x.Recall
167 }
168 return 0
169 }
170
171 func (x *TextSentimentEvaluationMetrics) GetF1Score() float32 {
172 if x != nil {
173 return x.F1Score
174 }
175 return 0
176 }
177
178 func (x *TextSentimentEvaluationMetrics) GetMeanAbsoluteError() float32 {
179 if x != nil {
180 return x.MeanAbsoluteError
181 }
182 return 0
183 }
184
185 func (x *TextSentimentEvaluationMetrics) GetMeanSquaredError() float32 {
186 if x != nil {
187 return x.MeanSquaredError
188 }
189 return 0
190 }
191
192 func (x *TextSentimentEvaluationMetrics) GetLinearKappa() float32 {
193 if x != nil {
194 return x.LinearKappa
195 }
196 return 0
197 }
198
199 func (x *TextSentimentEvaluationMetrics) GetQuadraticKappa() float32 {
200 if x != nil {
201 return x.QuadraticKappa
202 }
203 return 0
204 }
205
206 func (x *TextSentimentEvaluationMetrics) GetConfusionMatrix() *ClassificationEvaluationMetrics_ConfusionMatrix {
207 if x != nil {
208 return x.ConfusionMatrix
209 }
210 return nil
211 }
212
213 var File_google_cloud_automl_v1_text_sentiment_proto protoreflect.FileDescriptor
214
215 var file_google_cloud_automl_v1_text_sentiment_proto_rawDesc = []byte{
216 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61,
217 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65,
218 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x67,
219 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f,
220 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c,
221 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c,
222 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
223 0x74, 0x6f, 0x22, 0x37, 0x0a, 0x17, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d,
224 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a,
225 0x09, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
226 0x52, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x8f, 0x03, 0x0a, 0x1e,
227 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x61,
228 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1c,
229 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
230 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06,
231 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x72, 0x65,
232 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65,
233 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12,
234 0x2e, 0x0a, 0x13, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65,
235 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x6d, 0x65,
236 0x61, 0x6e, 0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12,
237 0x2c, 0x0a, 0x12, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x5f,
238 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x6d, 0x65, 0x61,
239 0x6e, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x21, 0x0a,
240 0x0c, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x6b, 0x61, 0x70, 0x70, 0x61, 0x18, 0x06, 0x20,
241 0x01, 0x28, 0x02, 0x52, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x4b, 0x61, 0x70, 0x70, 0x61,
242 0x12, 0x27, 0x0a, 0x0f, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6b, 0x61,
243 0x70, 0x70, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x64, 0x72,
244 0x61, 0x74, 0x69, 0x63, 0x4b, 0x61, 0x70, 0x70, 0x61, 0x12, 0x72, 0x0a, 0x10, 0x63, 0x6f, 0x6e,
245 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x08, 0x20,
246 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f,
247 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x61,
248 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75,
249 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x6f, 0x6e,
250 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x0f, 0x63, 0x6f,
251 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x42, 0xb4, 0x01,
252 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f,
253 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x12, 0x54, 0x65,
254 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f,
255 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
256 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x61,
257 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x70, 0x62, 0x3b, 0x61, 0x75,
258 0x74, 0x6f, 0x6d, 0x6c, 0x70, 0x62, 0xaa, 0x02, 0x16, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
259 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x2e, 0x56, 0x31, 0xca,
260 0x02, 0x16, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41,
261 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c,
262 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c,
263 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
264 }
265
266 var (
267 file_google_cloud_automl_v1_text_sentiment_proto_rawDescOnce sync.Once
268 file_google_cloud_automl_v1_text_sentiment_proto_rawDescData = file_google_cloud_automl_v1_text_sentiment_proto_rawDesc
269 )
270
271 func file_google_cloud_automl_v1_text_sentiment_proto_rawDescGZIP() []byte {
272 file_google_cloud_automl_v1_text_sentiment_proto_rawDescOnce.Do(func() {
273 file_google_cloud_automl_v1_text_sentiment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1_text_sentiment_proto_rawDescData)
274 })
275 return file_google_cloud_automl_v1_text_sentiment_proto_rawDescData
276 }
277
278 var file_google_cloud_automl_v1_text_sentiment_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
279 var file_google_cloud_automl_v1_text_sentiment_proto_goTypes = []any{
280 (*TextSentimentAnnotation)(nil), // 0: google.cloud.automl.v1.TextSentimentAnnotation
281 (*TextSentimentEvaluationMetrics)(nil), // 1: google.cloud.automl.v1.TextSentimentEvaluationMetrics
282 (*ClassificationEvaluationMetrics_ConfusionMatrix)(nil), // 2: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix
283 }
284 var file_google_cloud_automl_v1_text_sentiment_proto_depIdxs = []int32{
285 2, // 0: google.cloud.automl.v1.TextSentimentEvaluationMetrics.confusion_matrix:type_name -> google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix
286 1, // [1:1] is the sub-list for method output_type
287 1, // [1:1] is the sub-list for method input_type
288 1, // [1:1] is the sub-list for extension type_name
289 1, // [1:1] is the sub-list for extension extendee
290 0, // [0:1] is the sub-list for field type_name
291 }
292
293 func init() { file_google_cloud_automl_v1_text_sentiment_proto_init() }
294 func file_google_cloud_automl_v1_text_sentiment_proto_init() {
295 if File_google_cloud_automl_v1_text_sentiment_proto != nil {
296 return
297 }
298 file_google_cloud_automl_v1_classification_proto_init()
299 type x struct{}
300 out := protoimpl.TypeBuilder{
301 File: protoimpl.DescBuilder{
302 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
303 RawDescriptor: file_google_cloud_automl_v1_text_sentiment_proto_rawDesc,
304 NumEnums: 0,
305 NumMessages: 2,
306 NumExtensions: 0,
307 NumServices: 0,
308 },
309 GoTypes: file_google_cloud_automl_v1_text_sentiment_proto_goTypes,
310 DependencyIndexes: file_google_cloud_automl_v1_text_sentiment_proto_depIdxs,
311 MessageInfos: file_google_cloud_automl_v1_text_sentiment_proto_msgTypes,
312 }.Build()
313 File_google_cloud_automl_v1_text_sentiment_proto = out.File
314 file_google_cloud_automl_v1_text_sentiment_proto_rawDesc = nil
315 file_google_cloud_automl_v1_text_sentiment_proto_goTypes = nil
316 file_google_cloud_automl_v1_text_sentiment_proto_depIdxs = nil
317 }