From 8559b403edfa98f9a841bf941949bbe94b63eb3c Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Wed, 26 Feb 2014 17:50:44 +0900 Subject: [PATCH] Use NOT_A_PROBABILITY for adding OOV words. Bug: 13197276 Change-Id: I23f453c2c1deea70eab552f8d433fe264adf68b3 --- .../android/inputmethod/latin/utils/LanguageModelParam.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java b/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java index a1d641508..562ff9e8d 100644 --- a/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java +++ b/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java @@ -37,9 +37,9 @@ public final class LanguageModelParam { // non-0. Thus, it's not meaningful to compare 10, 100, and so on. // TODO: Revise the logic in ForgettingCurveUtils in native code. private static final int UNIGRAM_PROBABILITY_FOR_VALID_WORD = 100; - private static final int UNIGRAM_PROBABILITY_FOR_OOV_WORD = 10; - private static final int BIGRAM_PROBABILITY_FOR_VALID_WORD = 0; - private static final int BIGRAM_PROBABILITY_FOR_OOV_WORD = 0; + private static final int UNIGRAM_PROBABILITY_FOR_OOV_WORD = Dictionary.NOT_A_PROBABILITY; + private static final int BIGRAM_PROBABILITY_FOR_VALID_WORD = 10; + private static final int BIGRAM_PROBABILITY_FOR_OOV_WORD = Dictionary.NOT_A_PROBABILITY; public final String mTargetWord; public final int[] mWord0;