aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
diff options
context:
space:
mode:
authorDan Zivkovic <zivkovic@google.com>2015-02-25 15:57:59 -0800
committerDan Zivkovic <zivkovic@google.com>2015-02-25 17:59:58 -0800
commit5551302d275e3f54da9d86bcea633556ad12db8e (patch)
tree546240c21be53d829fe1521b6db126671e8e3594 /java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
parented378c78a15757c7386d84c6cd7470d56ed00c76 (diff)
downloadlatinime-5551302d275e3f54da9d86bcea633556ad12db8e.tar.gz
latinime-5551302d275e3f54da9d86bcea633556ad12db8e.tar.xz
latinime-5551302d275e3f54da9d86bcea633556ad12db8e.zip
Don't assume that correctable words are invalid
Currently, the Delight3DictionaryFacilitator sets a boolean flag when the top suggestion score exceeds the auto-correction threshold. This flag is used to trigger auto-correction of the typed word. Also, the existing logic assumes that if allowsToBeAutoCorrected then the word is invalid, which is no longer true after we stopped using whitelists. Bug 19518376. Change-Id: Ifa7f6a09c07d25ac68c6cf3aec91f358bd88689f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java')
-rw-r--r--java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
index e96300020..19b0c35bd 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
@@ -673,7 +673,8 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
int inputStyle, KeyboardLayout keyboardLayout) {
final DictionaryGroup[] dictionaryGroups = mDictionaryGroups;
final SuggestionResults suggestionResults = new SuggestionResults(
- SuggestedWords.MAX_SUGGESTIONS, ngramContext.isBeginningOfSentenceContext());
+ SuggestedWords.MAX_SUGGESTIONS, ngramContext.isBeginningOfSentenceContext(),
+ false /* firstSuggestionExceedsConfidenceThreshold */);
final float[] weightOfLangModelVsSpatialModel =
new float[] { Dictionary.NOT_A_WEIGHT_OF_LANG_MODEL_VS_SPATIAL_MODEL };
for (final DictionaryGroup dictionaryGroup : dictionaryGroups) {