Swype: pretty clever
Filed under: swypeSo I decided to give my new Samsung Galaxy S a full month before I returned it (I have 30 days to return it). During this time I've been able to resolve most of my complaints (especially the battery life, which was resolved by a firmware update that came out a couple of days ago). I've also managed to drink away a goodly portion of my aversion to new things, so I'm sure that helped some.
One feature that I have become a bit fascinated by is Swype. Swype is a text-entry method that sounds iffy but in practice works surprisingly well. Basically, rather than tapping keys on a virtual keyboard, you slide your finger across the letters in the word. For example, here's how you'd enter the word "quick":
I'd estimate that 90% of the time it gets the right word and the rest of the time it offers up a small window with a word list you can choose from. This is pretty good. But what's been interesting to me is the fact that you can be really sloppy with your input. That is, you can be off by a letter or two and it still gets the word (see the image above, where the letter "u" can't be distinguished by a vertex). At first glance, I assumed they were simply grabbing the letters at the vertices of the swipe and doing fuzzy spell-checking, but after a while I realized that this would be inaccurate and resource-consuming.
Today it suddenly occurred to me what they are most likely doing: they don't spell check, they shape check. That is, rather than checking letters, their database consists of shapes of words (specifically, a set of ordered vertices). These shapes are organized by cartesian coordinates (based on the keyboard), so that two identical shapes with different coordinates are different words. This means the keyboard becomes more of a cartesian-like guide to making shapes than an actual keyboard. This is remarkably similar to traditional text-recognition such as used by old Palm Pilots (except for the coordinate constraint). Given a shape and starting coordinate, it's straightforward to use a recognition technique such as a neural network to match it to a word in a database. I also expect the database is actually about the same size or smaller than a traditional word database. Using a neural net would also allow for many inaccuracies and variations in the input shape. I don't really follow advances in this field so neural nets may not be the technology du jour, but it's what I'm most familiar with.
Anyway, it's a pretty clever little application and I suspect I'll find myself using the physical keyboard less and less (ssh and passwords being the most obvious exception, although I may give that a try too).






