I use XT9. It may or may not be the best option out there, but it works for me. I like it because words require less key presses than the length of the word being entered, and also because since there are less keys (or touch-screen equivalent) they are bigger than on a Qwerty keypad, giving me more area per key and making it less likely to press the wrong key.
Now, I'm not an expert in phone software, but if I had to do an XT9 parser, these are the rules I come up with without much thought:
- Look for words matching the current input;
- Of the above, prefer complete words that match the length of the current input;
- Of the above, or if there are no direct length matches, pick the most used;
- Give the other words in a list sorted by frequency of use.
- If you don't want to keep track of the user's frequency of words, there are statistics on word usage for pretty much any language to help with that.
It's not particularly hard, right? I haven't put a lot of thought into it and I'm pretty sure the above rules would do a pretty decent job. The Samsung phone I had
generally got it right. But the current Android keyboard and any alternate keyboards I try prefer to do it this way:
- Look for words matching the current input
- Ignore one-letter words (trying to write "I" results in "g" unless I tap the letter I from the list)
- Of the word matches found, disregard frequency of use and instead:
- - Pick any words with special characters (such as áäéëíïóöúüñ)
- - If none have special characters, prefer the longest word available even if there are other words matching the length of the input
- - Pick the least likely word possible. The statistics will help achieve this.
- If a valid word is entered and it isn't one of the above, autocorrect-substitute it with one of the above.
- Finally, provide a list of alternative words following the above rules. If you run out of screen space, leave out the common words. You'll auto-correct them out anyway.
- For inputs over a certain length, don't bother matching or suggesting, just spew out the gibberish the user obviously wanted to type.
Which do you