Linguistics and machine learning. I just finished implementing a swipe trajectory recognition for a Swype-like keyboard. It's my thesis.
Code should follow.