aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/utils
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-11-26 10:41:33 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-26 10:41:33 +0000
commit88e021f2ef7d3a7e1df60d4cdd08a6f6bcc99c57 (patch)
treed6edf8e485c4117cabecdce4dc38a1c5976784e8 /java/src/com/android/inputmethod/latin/utils
parent9ab179a14247a91110940c3fe27da4004e6b952f (diff)
parent56577461d63ad3618598ceddfb9a73b797917061 (diff)
downloadlatinime-88e021f2ef7d3a7e1df60d4cdd08a6f6bcc99c57.tar.gz
latinime-88e021f2ef7d3a7e1df60d4cdd08a6f6bcc99c57.tar.xz
latinime-88e021f2ef7d3a7e1df60d4cdd08a6f6bcc99c57.zip
am 56577461: Allow whitelist changes when no close word
* commit '56577461d63ad3618598ceddfb9a73b797917061': Allow whitelist changes when no close word
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils')
-rw-r--r--java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java b/java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java
index 120cffbde..2fd257922 100644
--- a/java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java
@@ -29,9 +29,8 @@ public final class AutoCorrectionUtils {
// Purely static class: can't instantiate.
}
- public static boolean suggestionExceedsAutoCorrectionThreshold(
- final SuggestedWordInfo suggestion, final String consideredWord,
- final float autoCorrectionThreshold) {
+ public static boolean suggestionExceedsThreshold(final SuggestedWordInfo suggestion,
+ final String consideredWord, final float threshold) {
if (null != suggestion) {
// Shortlist a whitelisted word
if (suggestion.isKindOf(SuggestedWordInfo.KIND_WHITELIST)) {
@@ -45,11 +44,11 @@ public final class AutoCorrectionUtils {
if (DBG) {
Log.d(TAG, "Normalized " + consideredWord + "," + suggestion + ","
+ autoCorrectionSuggestionScore + ", " + normalizedScore
- + "(" + autoCorrectionThreshold + ")");
+ + "(" + threshold + ")");
}
- if (normalizedScore >= autoCorrectionThreshold) {
+ if (normalizedScore >= threshold) {
if (DBG) {
- Log.d(TAG, "Auto corrected by S-threshold.");
+ Log.d(TAG, "Exceeds threshold.");
}
return true;
}