Well, since I helped write Swype I'll give you a bit of help here. You're going to need to spend a lot of time studying DSP (digital signal processing) to understand how to evaluate the incoming touch data and figure out where letters are (this is more complicated than you think, because people don't Swype cleanly letter to letter- they loop and curl). The algorithms behind Swype were the end result of over a decade of research by our founder.