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