1. A method comprising: receiving, from a portable device that displays a virtual keyboard, information identifying a location, on the virtual keyboard, selected by a user and an input character, on the virtual keyboard, corresponding to the location; forming, by the portable device, a plurality of prefixes including a prefix formed based on the input character and prefixes formed based on characters, on the virtual keyboard, in proximity to the input character; calculating, by the portable device, a distance factor for each of the plurality of prefixes, the distance factor for each of the plurality of prefixes being calculated as a difference between: a distance between the location and a center of a key, of the virtual keyboard, corresponding to a respective character of the characters, and a key width corresponding to a distance between a key, of the virtual keyboard, corresponding to the input character and the key, of the virtual keyboard, corresponding to the respective character; generating, by the portable device, candidate words from the plurality of prefixes; determining a rank value associated with each of the candidate words to obtain ranked values, the rank value associated with each of the candidate words being determined based on the distance factor determined for a respective prefix of the plurality of prefixes; and displaying, by the portable device and to the user of the portable device, a subset of the candidate words, the subset of the candidate words being determined based on the rank values associated with the candidate words.
3. The method of claim 1 , where generating the candidate words includes: matching the plurality of prefixes to a dictionary to determine words that begin with one or more of the plurality of prefixes.