Recently I’ve had some free time on my hands , So I’ve started looking at writing a Maliit plugin for a gesture based keyboard.. I spent the last weekend coming up with a basic Demo of such a keyboard in Qt/QML … Apparently it’s really not that difficult.
This was really a quick and dirty project to test the waters and I’d say i’m pleasantly surprised how easy and how performant this was. Even on my 5 year old Samsung Galaxy Captivate( 1Ghz processor, 370MB RAM), there was absolutely no visible lag in predicting ~5 words from a dictionary of around 30000 words.
And here is the demo of what’s working so far:
1) A basic disambiguation algorithm, which says how likely “hgfdedfghjklo” is to be the word “Hello”. At it’s core, this is a modified Levenshtein Distance algorithm.
2) A basic prediction function which ranks words like “Hello” “He” “Hell” … in the increasing likelihood that they generally appear. ( Currently I’m using a basic Unigram generated from http://norvig.com/big.txt – written for his spell checker )
3) All the necessary infrastructure to parse keyboard definition files and create a virtual keyboard. ( I am designing this with multiple languages/keyboard layouts in mind )
1) Improve the word disambiguation algorithm and the feedback system. (quite interesting, probably – priority 1)
2) Improve the prediction precision by analyzing more real world text and analyzing user’s error model – priority 3)
3) Add a gesture to support inputting repeating characters. (priority 2)
4) Implement a proper state machine in engine to support things like backspace, arrow keys, auto capitalization etc.. (priority 1)
5) Make a Maliit plugin out of it. (priority 2 – mainly because it seems like it would be faster to develop and test the demo than the whole Maliit plugin)
6) Look into multi language support. (priority 5 – kind of too much for me)
7) Make it prettier (priority 4)
I’m hoping to make this FOSS… But I haven’t yet decided if I would want to put a price on this => the code stays behind closed doors for now. So if you don’t hear any updates from from me about this in 1-2 months from now (I’m only working on this during weekends, and spare time as of now…), feel free to ping me and I’ll open up the source code immediately.
Thanks to :
1) norvig.com/spell-correct.html 2) codeproject.com/Articles/36869/Fuzzy-Search 3) presage.sourceforge.net/ 4) www.iconfinder.com/ 5) invokeit.wordpress.com/frequency-word-lists/ 6) abloz.com/huzheng/stardict-dic/dict.org/