blob: 9c371e505f31adeaf5399ed16fb64a7de28a627a [file] [log] [blame]
// 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.
//
// Translation Assist Model to allow/suppress translation prompts.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package assist_ranker;
// 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 TranslateLogisticRegressionModel {
// 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 {
TranslateLogisticRegressionModel translate_logistic_regression_model = 2;
}
}