Skip to content
Snippets Groups Projects
Commit d2f210db authored by Satoshi Kataoka's avatar Satoshi Kataoka Committed by Android Git Automerger
Browse files

am d9c702d2: am 5caaf1b9: Merge "Do not add profanity to user history bigram...

am d9c702d2: am 5caaf1b9: Merge "Do not add profanity to user history bigram dicitonary" into jb-dev

* commit 'd9c702d2':
  Do not add profanity to user history bigram dicitonary
parents c380959f d9c702d2
No related branches found
No related tags found
No related merge requests found
......@@ -1981,10 +1981,11 @@ 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".
// We demote unrecognized words (frequency < 0, below) by specifying them as "invalid".
// We don't add words with 0-frequency (assuming they would be profanity etc.).
final int maxFreq = AutoCorrection.getMaxFrequency(
mSuggest.getUnigramDictionaries(), suggestion);
if (maxFreq == 0) return null;
mUserHistoryDictionary.addToUserHistory(null == prevWord ? null : prevWord.toString(),
secondWord, maxFreq > 0);
return prevWord;
......
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