diff options
author | 2015-02-26 03:44:20 +0000 | |
---|---|---|
committer | 2015-02-26 03:44:20 +0000 | |
commit | e4619f029e84fd845b0771871218274b99c30ffa (patch) | |
tree | c3fec3f92f1ce678ae15c2157ac563ea048b9aa4 /java/src/com/android/inputmethod/latin/utils/SuggestionResults.java | |
parent | 48ba1ea19f7e18a24813a9301ed620612c2e53d7 (diff) | |
parent | 5551302d275e3f54da9d86bcea633556ad12db8e (diff) | |
download | latinime-e4619f029e84fd845b0771871218274b99c30ffa.tar.gz latinime-e4619f029e84fd845b0771871218274b99c30ffa.tar.xz latinime-e4619f029e84fd845b0771871218274b99c30ffa.zip |
Merge "Don't assume that correctable words are invalid"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/SuggestionResults.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/utils/SuggestionResults.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java b/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java index 10e3994b6..981355115 100644 --- a/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java +++ b/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java @@ -33,21 +33,18 @@ public final class SuggestionResults extends TreeSet<SuggestedWordInfo> { // TODO: Instead of a boolean , we may want to include the context of this suggestion results, // such as {@link NgramContext}. public final boolean mIsBeginningOfSentence; - public final boolean mAutocorrectRecommendation; + public final boolean mFirstSuggestionExceedsConfidenceThreshold; private final int mCapacity; - public SuggestionResults(final int capacity, final boolean isBeginningOfSentence) { - this(sSuggestedWordInfoComparator, capacity, isBeginningOfSentence, false); - } - public SuggestionResults(final int capacity, final boolean isBeginningOfSentence, - final boolean autocorrectRecommendation) { + final boolean firstSuggestionExceedsConfidenceThreshold) { this(sSuggestedWordInfoComparator, capacity, isBeginningOfSentence, - autocorrectRecommendation); + firstSuggestionExceedsConfidenceThreshold); } private SuggestionResults(final Comparator<SuggestedWordInfo> comparator, final int capacity, - final boolean isBeginningOfSentence, final boolean autocorrectRecommendation) { + final boolean isBeginningOfSentence, + final boolean firstSuggestionExceedsConfidenceThreshold) { super(comparator); mCapacity = capacity; if (ProductionFlags.INCLUDE_RAW_SUGGESTIONS) { @@ -56,7 +53,7 @@ public final class SuggestionResults extends TreeSet<SuggestedWordInfo> { mRawSuggestions = null; } mIsBeginningOfSentence = isBeginningOfSentence; - mAutocorrectRecommendation = autocorrectRecommendation; + mFirstSuggestionExceedsConfidenceThreshold = firstSuggestionExceedsConfidenceThreshold; } @Override |