translation.proto 2.4 KB

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