diff options
author | 2014-03-05 02:10:05 -0800 | |
---|---|---|
committer | 2014-03-05 02:10:05 -0800 | |
commit | 99bba3ee1bdf81ce97835ca7568ad0ec74cccc96 (patch) | |
tree | 1df5d11c5e53cb500025db63f8ecb4639516c580 /java/src/com/android/inputmethod/latin/spellcheck | |
parent | e0eca9fdcf48cef29fda3a6d7cd06f5175774906 (diff) | |
parent | 274eae95ba78848632afb60394105057e9cfce78 (diff) | |
download | latinime-99bba3ee1bdf81ce97835ca7568ad0ec74cccc96.tar.gz latinime-99bba3ee1bdf81ce97835ca7568ad0ec74cccc96.tar.xz latinime-99bba3ee1bdf81ce97835ca7568ad0ec74cccc96.zip |
am 274eae95: Merge "Separate utility methods from BinaryDictionary."
* commit '274eae95ba78848632afb60394105057e9cfce78':
Separate utility methods from BinaryDictionary.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/spellcheck')
-rw-r--r-- | java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index dae36f7dd..a07e8eb6a 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -37,6 +37,7 @@ import com.android.inputmethod.latin.SynchronouslyLoadedContactsBinaryDictionary import com.android.inputmethod.latin.SynchronouslyLoadedUserBinaryDictionary; import com.android.inputmethod.latin.UserBinaryDictionary; import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils; +import com.android.inputmethod.latin.utils.BinaryDictionaryUtils; import com.android.inputmethod.latin.utils.CollectionUtils; import com.android.inputmethod.latin.utils.LocaleUtils; import com.android.inputmethod.latin.utils.StringUtils; @@ -320,7 +321,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService hasRecommendedSuggestions = false; } else { gatheredSuggestions = EMPTY_STRING_ARRAY; - final float normalizedScore = BinaryDictionary.calcNormalizedScore( + final float normalizedScore = BinaryDictionaryUtils.calcNormalizedScore( mOriginalText, mBestSuggestion, mBestScore); hasRecommendedSuggestions = (normalizedScore > mRecommendedThreshold); } @@ -355,7 +356,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService final int bestScore = mScores[mLength - 1]; final String bestSuggestion = mSuggestions.get(0); final float normalizedScore = - BinaryDictionary.calcNormalizedScore( + BinaryDictionaryUtils.calcNormalizedScore( mOriginalText, bestSuggestion.toString(), bestScore); hasRecommendedSuggestions = (normalizedScore > mRecommendedThreshold); if (DBG) { |