translate_ranker_model.proto 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright (c) 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. //
  5. // Translation Assist Model to allow/suppress translation prompts.
  6. syntax = "proto2";
  7. option optimize_for = LITE_RUNTIME;
  8. package assist_ranker;
  9. // Defines a Chrome Ranker Translate Model.
  10. // Next tag: 13
  11. message TranslateRankerModel {
  12. // A number that identifies the version of this model.
  13. optional uint32 version = 1;
  14. // Defines the weights and bias of a Logistic Regression Model.
  15. message TranslateLogisticRegressionModel {
  16. // Decision threshold. If not defined, use 0.5.
  17. optional float threshold = 12;
  18. optional float bias = 1;
  19. optional float accept_ratio_weight = 2;
  20. optional float decline_ratio_weight = 3;
  21. optional float ignore_ratio_weight = 4;
  22. optional float accept_count_weight = 9;
  23. optional float decline_count_weight = 10;
  24. optional float ignore_count_weight = 11;
  25. // One-hot features are encoded in the form of a map. These maps
  26. // each contain an element 'UNKNOWN' to use in case the key is not
  27. // found in the map.
  28. map<string, float> source_language_weight = 5;
  29. map<string, float> target_language_weight = 6;
  30. map<string, float> country_weight = 7;
  31. map<string, float> locale_weight = 8;
  32. }
  33. oneof model_revision {
  34. TranslateLogisticRegressionModel translate_logistic_regression_model = 2;
  35. }
  36. }