Skip to content
Snippets Groups Projects
Commit 4b202345 authored by Aleksandras Kostarevas's avatar Aleksandras Kostarevas
Browse files

Fix incorrect locale weighting

parent e980343f
Branches model-metadata
No related tags found
No related merge requests found
......@@ -356,7 +356,8 @@ public final class BinaryDictionary extends Dictionary {
suggestions.add(new SuggestedWordInfo(
new String(session.mOutputCodePoints, start, len),
"" /* prevWordsContext */,
(int)(session.mOutputScores[j] * weightForLocale),
// TODO: 200.0f is an arbitrary number
(int)(session.mOutputScores[j] - (200.0f * (1.0f - weightForLocale))),
session.mOutputTypes[j],
this /* sourceDict */,
session.mSpaceIndices[j] /* indexOfTouchPointOfSecondWord */,
......
......@@ -138,7 +138,7 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
// TODO: Run evaluation to determine a reasonable value for these constants. The current
// values are ad-hoc and chosen without any particular care or methodology.
public static final float WEIGHT_FOR_MOST_PROBABLE_LANGUAGE = 1.0f;
public static final float WEIGHT_FOR_GESTURING_IN_NOT_MOST_PROBABLE_LANGUAGE = 0.6f;
public static final float WEIGHT_FOR_GESTURING_IN_NOT_MOST_PROBABLE_LANGUAGE = 0.0f;
public static final float WEIGHT_FOR_TYPING_IN_NOT_MOST_PROBABLE_LANGUAGE = 0.8f;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment