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 // Next tag: 12 | 14 // Next tag: 12 |
15 message TranslateRankerModel { | 15 message TranslateRankerModel { |
16 // A number that identifies the version of this model. | 16 // A number that identifies the version of this model. |
17 optional uint32 version = 1; | 17 optional uint32 version = 1; |
18 | 18 |
19 // Defines the weights and bias of a Logistic Regression Model. | 19 // Defines the weights and bias of a Logistic Regression Model. |
20 message LogisticRegressionModel { | 20 message LogisticRegressionModel { |
21 optional float bias = 1; | 21 optional float bias = 1; |
22 | 22 |
23 optional float accept_ratio_weight = 2; | 23 optional float accept_ratio_weight = 2; |
24 optional float decline_ratio_weight = 3; | 24 optional float decline_ratio_weight = 3; |
25 optional float ignore_ratio_weight = 4; | 25 optional float ignore_ratio_weight = 4; |
26 | 26 |
27 optional float accept_count_weight = 9; | 27 optional float accept_count_weight = 9; |
28 optional float decline_count_weight = 10; | 28 optional float decline_count_weight = 10; |
29 optional float ignore_count_weight = 11; | 29 optional float ignore_count_weight = 11; |
30 | 30 |
31 // One-hot features are encoded in the form of a map. These maps | 31 // One-hot features are encoded in the form of a map. These maps |
32 // each contain an element 'UNKNOWN' to use in case the key is not | 32 // each contain an element 'UNKNOWN' to use in case the key is not |
33 // found in the map. | 33 // found in the map. |
34 map<string, float> source_language_weight = 5; | 34 map<string, float> source_language_weight = 5; |
35 map<string, float> dest_language_weight = 6; | 35 map<string, float> dest_language_weight = 6; |
36 map<string, float> country_weight = 7; | 36 map<string, float> country_weight = 7; |
37 map<string, float> locale_weight = 8; | 37 map<string, float> locale_weight = 8; |
38 } | 38 } |
39 optional LogisticRegressionModel logistic_regression_model = 2; | 39 |
| 40 oneof model_revision { |
| 41 LogisticRegressionModel logistic_regression_model = 2; |
| 42 } |
40 } | 43 } |
OLD | NEW |