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/Dictionary.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/Dictionary.java')
-rw-r--r-- | src/com/android/inputmethod/latin/Dictionary.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/inputmethod/latin/Dictionary.java b/src/com/android/inputmethod/latin/Dictionary.java index 6c1c856e7..b656d04dc 100644 --- a/src/com/android/inputmethod/latin/Dictionary.java +++ b/src/com/android/inputmethod/latin/Dictionary.java @@ -55,9 +55,14 @@ abstract public class Dictionary { * words are added through the callback object. * @param composer the key sequence to match * @param callback the callback object to send matched words to as possible candidates + * @param nextLettersFrequencies array of frequencies of next letters that could follow the + * word so far. For instance, "bracke" can be followed by "t", so array['t'] will have + * a non-zero value on returning from this method. + * Pass in null if you don't want the dictionary to look up next letters. * @see WordCallback#addWord(char[], int, int) */ - abstract public void getWords(final WordComposer composer, final WordCallback callback); + abstract public void getWords(final WordComposer composer, final WordCallback callback, + int[] nextLettersFrequencies); /** * Checks if the given word occurs in the dictionary |