diff options
author | 2010-02-05 14:07:04 -0800 | |
---|---|---|
committer | 2010-02-08 15:22:37 -0800 | |
commit | 1b62ff1a3d61cd44ab88acdfcbdf0fc70a7e1b10 (patch) | |
tree | 17739a10acf4f7f9e70b82ba4d0a2f1c17c914b4 /src/com/android/inputmethod/latin/LatinIME.java | |
parent | 8fa317a61a2152347c59dda7eb1b8e2979f6cc1d (diff) | |
download | latinime-1b62ff1a3d61cd44ab88acdfcbdf0fc70a7e1b10.tar.gz latinime-1b62ff1a3d61cd44ab88acdfcbdf0fc70a7e1b10.tar.xz latinime-1b62ff1a3d61cd44ab88acdfcbdf0fc70a7e1b10.zip |
Increase target size of preferred letters while typing.
This increases the chance of hitting the correct letter when typing a word
that exists in the dictionary, rather than only correct it after the fact.
It is most effective after 2 or 3 letters of a word have been typed and gets
more accurate with more typed letters in the word.
If 2 adjacent letters have similar probabilities of occuring, then there is no
hit correction applied.
Diffstat (limited to 'src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | src/com/android/inputmethod/latin/LatinIME.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java index 56971a534..470b0048e 100644 --- a/src/com/android/inputmethod/latin/LatinIME.java +++ b/src/com/android/inputmethod/latin/LatinIME.java @@ -1340,6 +1340,8 @@ public class LatinIME extends InputMethodService private void updateSuggestions() { mSuggestionShouldReplaceCurrentWord = false; + ((LatinKeyboard) mInputView.getKeyboard()).setPreferredLetters(null); + // Check if we have a suggestion engine attached. if ((mSuggest == null || !isPredictionOn()) && !mVoiceInputHighlighted) { return; @@ -1351,6 +1353,10 @@ public class LatinIME extends InputMethodService } List<CharSequence> stringList = mSuggest.getSuggestions(mInputView, mWord, false); + int[] nextLettersFrequencies = mSuggest.getNextLettersFrequencies(); + + ((LatinKeyboard) mInputView.getKeyboard()).setPreferredLetters(nextLettersFrequencies); + boolean correctionAvailable = mSuggest.hasMinimalCorrection(); //|| mCorrectionMode == mSuggest.CORRECTION_FULL; CharSequence typedWord = mWord.getTypedWord(); |