Remove redundant method AutoCorrection.isInTheDictionary
Change-Id: I0737fb0b68f411f4db06014f2d94804935808922main
parent
df8f0fb64b
commit
ebe0544fc8
|
@ -73,13 +73,6 @@ public final class AutoCorrection {
|
||||||
return maxFreq;
|
return maxFreq;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true if this is in any of the dictionaries.
|
|
||||||
public static boolean isInTheDictionary(
|
|
||||||
final ConcurrentHashMap<String, Dictionary> dictionaries,
|
|
||||||
final String word, final boolean ignoreCase) {
|
|
||||||
return isValidWord(dictionaries, word, ignoreCase);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean suggestionExceedsAutoCorrectionThreshold(
|
public static boolean suggestionExceedsAutoCorrectionThreshold(
|
||||||
final SuggestedWordInfo suggestion, final String consideredWord,
|
final SuggestedWordInfo suggestion, final String consideredWord,
|
||||||
final float autoCorrectionThreshold) {
|
final float autoCorrectionThreshold) {
|
||||||
|
|
|
@ -229,7 +229,7 @@ public final class Suggest {
|
||||||
// or if it's a 2+ characters non-word (i.e. it's not in the dictionary).
|
// or if it's a 2+ characters non-word (i.e. it's not in the dictionary).
|
||||||
final boolean allowsToBeAutoCorrected = (null != whitelistedWord
|
final boolean allowsToBeAutoCorrected = (null != whitelistedWord
|
||||||
&& !whitelistedWord.equals(consideredWord))
|
&& !whitelistedWord.equals(consideredWord))
|
||||||
|| (consideredWord.length() > 1 && !AutoCorrection.isInTheDictionary(mDictionaries,
|
|| (consideredWord.length() > 1 && !AutoCorrection.isValidWord(mDictionaries,
|
||||||
consideredWord, wordComposer.isFirstCharCapitalized()));
|
consideredWord, wordComposer.isFirstCharCapitalized()));
|
||||||
|
|
||||||
final boolean hasAutoCorrection;
|
final boolean hasAutoCorrection;
|
||||||
|
|
Loading…
Reference in New Issue