1. A system for disambiguating a text input of a sub-word of a long word on an electronic device comprising: a memory storing computer-executable instructions of: a virtual keyboard having a plurality of virtual keys; the virtual keyboard receiving input from a pointing device that is placed on a key of the keyboard corresponding to the first character of the sub-word and moved to subsequent keys corresponding to subsequent characters of the sub-word, wherein the received input represents a trajectory pattern; a dictionary database associated with the keyboard and the pointing device, the dictionary database comprising words and associated frequencies of usage; a long word dictionary (LWD) derived from the dictionary database, the LWD having a smaller size than the dictionary database and configured according to an arrangement of the keys in the keyboard; and a partial trajectory recognition module associated with the keyboard and the pointing device, and configured to evaluate the trajectory pattern to produce sub-word solutions; wherein the sub-word solutions are used in conjunction with the LWD to generate at least one prediction solution corresponding to at least one long word, and a processor for executing the computer-executable instructions stored in the memory.