1// Copyright 2020 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
15syntax = "proto3";
16
17package google.cloud.automl.v1beta1;
18
19import "google/api/field_behavior.proto";
20import "google/cloud/automl/v1beta1/data_items.proto";
21
22option go_package = "cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb";
23option java_multiple_files = true;
24option java_outer_classname = "TranslationProto";
25option java_package = "com.google.cloud.automl.v1beta1";
26option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
27option ruby_package = "Google::Cloud::AutoML::V1beta1";
28
29// Dataset metadata that is specific to translation.
30message TranslationDatasetMetadata {
31  // Required. The BCP-47 language code of the source language.
32  string source_language_code = 1 [(google.api.field_behavior) = REQUIRED];
33
34  // Required. The BCP-47 language code of the target language.
35  string target_language_code = 2 [(google.api.field_behavior) = REQUIRED];
36}
37
38// Evaluation metrics for the dataset.
39message TranslationEvaluationMetrics {
40  // Output only. BLEU score.
41  double bleu_score = 1;
42
43  // Output only. BLEU score for base model.
44  double base_bleu_score = 2;
45}
46
47// Model metadata that is specific to translation.
48message TranslationModelMetadata {
49  // The resource name of the model to use as a baseline to train the custom
50  // model. If unset, we use the default base model provided by Google
51  // Translate. Format:
52  // `projects/{project_id}/locations/{location_id}/models/{model_id}`
53  string base_model = 1;
54
55  // Output only. Inferred from the dataset.
56  // The source languge (The BCP-47 language code) that is used for training.
57  string source_language_code = 2;
58
59  // Output only. The target languge (The BCP-47 language code) that is used for
60  // training.
61  string target_language_code = 3;
62}
63
64// Annotation details specific to translation.
65message TranslationAnnotation {
66  // Output only . The translated content.
67  TextSnippet translated_content = 1;
68}
69