Loading java/src/com/android/inputmethod/latin/Suggest.java +12 −11 Original line number Diff line number Diff line Loading @@ -174,15 +174,6 @@ public class Suggest { : typedWord; LatinImeLogger.onAddSuggestedWord(typedWord, Dictionary.TYPE_USER_TYPED); if (wordComposer.size() <= 1) { // At first character typed, search only the bigrams if (!TextUtils.isEmpty(prevWordForBigram)) { for (final String key : mDictionaries.keySet()) { final Dictionary dictionary = mDictionaries.get(key); suggestionsSet.addAll(dictionary.getBigrams(wordComposer, prevWordForBigram)); } } } else { final WordComposer wordComposerForLookup; if (trailingSingleQuotesCount > 0) { wordComposerForLookup = new WordComposer(wordComposer); Loading @@ -192,6 +183,16 @@ public class Suggest { } else { wordComposerForLookup = wordComposer; } if (wordComposerForLookup.size() <= 1) { // At first character typed, search only the bigrams if (!TextUtils.isEmpty(prevWordForBigram)) { for (final String key : mDictionaries.keySet()) { final Dictionary dictionary = mDictionaries.get(key); suggestionsSet.addAll(dictionary.getBigrams(wordComposerForLookup, prevWordForBigram)); } } } else { // At second character typed, search the unigrams (scores being affected by bigrams) for (final String key : mDictionaries.keySet()) { final Dictionary dictionary = mDictionaries.get(key); Loading Loading
java/src/com/android/inputmethod/latin/Suggest.java +12 −11 Original line number Diff line number Diff line Loading @@ -174,15 +174,6 @@ public class Suggest { : typedWord; LatinImeLogger.onAddSuggestedWord(typedWord, Dictionary.TYPE_USER_TYPED); if (wordComposer.size() <= 1) { // At first character typed, search only the bigrams if (!TextUtils.isEmpty(prevWordForBigram)) { for (final String key : mDictionaries.keySet()) { final Dictionary dictionary = mDictionaries.get(key); suggestionsSet.addAll(dictionary.getBigrams(wordComposer, prevWordForBigram)); } } } else { final WordComposer wordComposerForLookup; if (trailingSingleQuotesCount > 0) { wordComposerForLookup = new WordComposer(wordComposer); Loading @@ -192,6 +183,16 @@ public class Suggest { } else { wordComposerForLookup = wordComposer; } if (wordComposerForLookup.size() <= 1) { // At first character typed, search only the bigrams if (!TextUtils.isEmpty(prevWordForBigram)) { for (final String key : mDictionaries.keySet()) { final Dictionary dictionary = mDictionaries.get(key); suggestionsSet.addAll(dictionary.getBigrams(wordComposerForLookup, prevWordForBigram)); } } } else { // At second character typed, search the unigrams (scores being affected by bigrams) for (final String key : mDictionaries.keySet()) { final Dictionary dictionary = mDictionaries.get(key); Loading