mozilla-b2g/gaia — pull request #4925 by ckerschb (2012-09-19 18:49:48+00:00)
Title: bug fix for predictive text where input words start with a diacritic

a) In the predictive text engine we do create a map for mapping upper to lower case characters (line 621 in latin-worker.js). However, this only works for base letters, not for diacritics. We missed correct predictions for words that start with an upper case diacritic. To avoid such mispredictions we encode all upper/lower case diacritics in the dictionary itself.

b) It also makes sense to increase the prefixLimit - 6 characters surely works fine for english because it consists mostly of short words, for german or italian however it is the better choice to increase the prefixLimit to 10. This increases the size of the dictionary but no effect on runtime performance.

c) There also was an off by one error, storing only 3 words per Node (not 4).

d) It also doesn't make sense to store words consiting only of one character.