summaryrefslogtreecommitdiff
path: root/chromium/components/machine_intelligence/proto/translate_ranker_model.proto
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/machine_intelligence/proto/translate_ranker_model.proto')
-rw-r--r--chromium/components/machine_intelligence/proto/translate_ranker_model.proto46
1 files changed, 46 insertions, 0 deletions
diff --git a/chromium/components/machine_intelligence/proto/translate_ranker_model.proto b/chromium/components/machine_intelligence/proto/translate_ranker_model.proto
new file mode 100644
index 00000000000..8a4f4ec1785
--- /dev/null
+++ b/chromium/components/machine_intelligence/proto/translate_ranker_model.proto
@@ -0,0 +1,46 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Experimental Translation Assist Model to allow/suppress translation prompts.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+package machine_intelligence;
+
+// Defines a Chrome Ranker Translate Model.
+// Next tag: 13
+message TranslateRankerModel {
+ // A number that identifies the version of this model.
+ optional uint32 version = 1;
+
+ // Defines the weights and bias of a Logistic Regression Model.
+ message LogisticRegressionModel {
+ // Decision threshold. If not defined, use 0.5.
+ optional float threshold = 12;
+
+ optional float bias = 1;
+
+ optional float accept_ratio_weight = 2;
+ optional float decline_ratio_weight = 3;
+ optional float ignore_ratio_weight = 4;
+
+ optional float accept_count_weight = 9;
+ optional float decline_count_weight = 10;
+ optional float ignore_count_weight = 11;
+
+ // One-hot features are encoded in the form of a map. These maps
+ // each contain an element 'UNKNOWN' to use in case the key is not
+ // found in the map.
+ map<string, float> source_language_weight = 5;
+ map<string, float> target_language_weight = 6;
+ map<string, float> country_weight = 7;
+ map<string, float> locale_weight = 8;
+ }
+
+ oneof model_revision {
+ LogisticRegressionModel logistic_regression_model = 2;
+ }
+}