Commit 28f18633 authored by hamelphi's avatar hamelphi Committed by Commit bot

Change dest_language to target_language in the logistic regression model for...

Change dest_language to target_language in the logistic regression model for consistency with google3 proto and translate_event_protos.

BUG=646711

Review-Url: https://codereview.chromium.org/2803353002
Cr-Commit-Position: refs/heads/master@{#463410}
parent e62eb16e
......@@ -32,7 +32,7 @@ message TranslateRankerModel {
// 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> dest_language_weight = 6;
map<string, float> target_language_weight = 6;
map<string, float> country_weight = 7;
map<string, float> locale_weight = 8;
}
......
......@@ -259,7 +259,7 @@ double TranslateRankerImpl::CalculateScore(
(features.denied_ratio * logit.decline_ratio_weight()) +
(features.ignored_ratio * logit.ignore_ratio_weight()) +
ScoreComponent(logit.source_language_weight(), features.src_lang) +
ScoreComponent(logit.dest_language_weight(), features.dst_lang) +
ScoreComponent(logit.target_language_weight(), features.dst_lang) +
ScoreComponent(logit.country_weight(), features.country) +
ScoreComponent(logit.locale_weight(), features.app_locale);
......
......@@ -152,8 +152,8 @@ std::unique_ptr<TranslateRankerImpl> TranslateRankerImplTest::GetRankerForTest(
src_language_weight["fr"] = 0.05f;
src_language_weight["zh"] = 0.06f;
auto& dest_language_weight = *details->mutable_dest_language_weight();
dest_language_weight["UNKNOWN"] = 0.00f;
auto& target_language_weight = *details->mutable_target_language_weight();
target_language_weight["UNKNOWN"] = 0.00f;
auto& country_weight = *details->mutable_country_weight();
country_weight["de"] = 0.07f;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment