translation.proto 2.5 KB

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