diff options
author | 2012-05-29 04:46:35 -0700 | |
---|---|---|
committer | 2012-05-29 04:46:35 -0700 | |
commit | 408fa1ac48a3eb6f378274d5dd0e490da0f453ae (patch) | |
tree | dba8c46eb69ac874fe8a3f47cb8243ed3c8768a7 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 08c295c5bb8d48b26a4486ed42a32a955b39ddd3 (diff) | |
parent | 961e676b9a6b8282b1049715523aa520d3b6a6e5 (diff) | |
download | latinime-408fa1ac48a3eb6f378274d5dd0e490da0f453ae.tar.gz latinime-408fa1ac48a3eb6f378274d5dd0e490da0f453ae.tar.xz latinime-408fa1ac48a3eb6f378274d5dd0e490da0f453ae.zip |
am 961e676b: Merge "Set level 1 as the initial value of the valid words" into jb-dev
* commit '961e676b9a6b8282b1049715523aa520d3b6a6e5':
Set level 1 as the initial value of the valid words
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 52088812d..38549436b 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -2093,8 +2093,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } else { secondWord = suggestion.toString(); } + // We demote unrecognized word and words with 0-frequency (assuming they would be + // profanity etc.) by specifying them as "invalid". + final int maxFreq = AutoCorrection.getMaxFrequency( + mSuggest.getUnigramDictionaries(), suggestion); mUserHistoryDictionary.addToUserHistory(null == prevWord ? null : prevWord.toString(), - secondWord); + secondWord, maxFreq > 0); return prevWord; } return null; |