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