aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
diff options
context:
space:
mode:
authorAdrian Velicu <adrianv@google.com>2014-10-29 15:46:19 +0900
committerAdrian Velicu <adrianv@google.com>2014-10-31 15:58:50 +0900
commit009e02ce4a132b0f94d130c36761e18935577af1 (patch)
tree4debd90f9b1fc132adfd24c51190a05bf0f981c8 /java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
parent10416241f7badaedfbafd9858deda9dca496bd08 (diff)
downloadlatinime-009e02ce4a132b0f94d130c36761e18935577af1.tar.gz
latinime-009e02ce4a132b0f94d130c36761e18935577af1.tar.xz
latinime-009e02ce4a132b0f94d130c36761e18935577af1.zip
Further fixes to treat 0-frequency words
Previously, when both legitimate 0-frequency words (such as distracters) and offensive words were encoded in the same way, distracters would never show up when the user blocked offensive words (the default setting, as well as the setting for regression tests). When b/11031090 was fixed and a separate encoding was used for offensive words, 0-frequency words would no longer be blocked when they were an "exact match" (where case mismatches and accent mismatches would be considered an "exact match"). The exact match boosting functionality meant that, for example, when the user typed "mt" they would be suggested the word "Mt", although they most probably meant to type "my". For this reason, we introduced this change, which does the following: * Defines the "perfect match" as a really exact match, with no room for case or accent mismatches * When the target word has probability zero (as "Mt" does, because it is a distracter), ONLY boost its score if it is a perfect match. By doing this, when the user types "mt", the word "Mt" will NOT be boosted, and they will get "my". However, if the user makes an explicit effort to type "Mt", we do boost the word "Mt" so that the user's input is not autocorrected to "My". Bug: 11031090 Change-Id: I92ee1b4e742645d52e2f7f8c4390920481e8fff0
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java')
0 files changed, 0 insertions, 0 deletions