aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
authorAdrian Velicu <adrianv@google.com>2014-09-17 09:27:14 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-17 09:27:14 +0000
commitde1d56fe0ed32717016c09b12dd18b8ba93f4912 (patch)
tree256409f2a1de90a7b91744c2311eebc077632d54 /java/src/com/android/inputmethod/latin
parent4751c9c158f24408d91b768029e3d2f059a27245 (diff)
parentf116f9103377866c3a1e5d2b03907bbfead2970b (diff)
downloadlatinime-de1d56fe0ed32717016c09b12dd18b8ba93f4912.tar.gz
latinime-de1d56fe0ed32717016c09b12dd18b8ba93f4912.tar.xz
latinime-de1d56fe0ed32717016c09b12dd18b8ba93f4912.zip
am f116f910: Making spelling of the word "distracters" consistent
* commit 'f116f9103377866c3a1e5d2b03907bbfead2970b': Making spelling of the word "distracters" consistent
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java2
-rw-r--r--java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java12
2 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 9bf017578..4ad5ba65e 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -235,7 +235,7 @@ public final class Suggest {
SuggestedWordInfo.removeDups(null /* typedWord */, suggestionsContainer);
// For some reason some suggestions with MIN_VALUE are making their way here.
- // TODO: Find a more robust way to detect distractors.
+ // TODO: Find a more robust way to detect distracters.
for (int i = suggestionsContainer.size() - 1; i >= 0; --i) {
if (suggestionsContainer.get(i).mScore < SUPPRESS_SUGGEST_THRESHOLD) {
suggestionsContainer.remove(i);
diff --git a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
index 1db525502..f8a845304 100644
--- a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
+++ b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
@@ -64,9 +64,9 @@ public class DistracterFilterCheckingExactMatchesAndSuggestions implements Distr
private final Object mLock = new Object();
// If the score of the top suggestion exceeds this value, the tested word (e.g.,
- // an OOV, a misspelling, or an in-vocabulary word) would be considered as a distractor to
+ // an OOV, a misspelling, or an in-vocabulary word) would be considered as a distracter to
// words in dictionary. The greater the threshold is, the less likely the tested word would
- // become a distractor, which means the tested word will be more likely to be added to
+ // become a distracter, which means the tested word will be more likely to be added to
// the dictionary.
private static final float DISTRACTER_WORD_SCORE_THRESHOLD = 0.4f;
@@ -196,7 +196,7 @@ public class DistracterFilterCheckingExactMatchesAndSuggestions implements Distr
}
final boolean Word = dictionaryFacilitator.isValidWord(testedWord, false /* ignoreCase */);
if (Word) {
- // Valid word is not a distractor.
+ // Valid word is not a distracter.
if (DEBUG) {
Log.d(TAG, "isDistracter: false (valid word)");
}
@@ -257,12 +257,12 @@ public class DistracterFilterCheckingExactMatchesAndSuggestions implements Distr
return false;
}
final SuggestedWordInfo firstSuggestion = suggestionResults.first();
- final boolean isDistractor = suggestionExceedsDistracterThreshold(
+ final boolean isDistracter = suggestionExceedsDistracterThreshold(
firstSuggestion, consideredWord, DISTRACTER_WORD_SCORE_THRESHOLD);
if (DEBUG) {
- Log.d(TAG, "isDistracter: " + isDistractor);
+ Log.d(TAG, "isDistracter: " + isDistracter);
}
- return isDistractor;
+ return isDistracter;
}
private static boolean suggestionExceedsDistracterThreshold(final SuggestedWordInfo suggestion,