1. A computer-implemented method, comprising: at a portable electronic device with a keyboard: receiving a sequence of input characters from the keyboard, wherein the keyboard has a predefined layout with a plurality of keys, each respective key in the plurality of keys corresponding to a single respective character, each respective key in the predefined layout having one or more neighbor keys; generating a set of strings from at least a subset of the sequence of input characters, the set of strings comprising permutations of respective input characters in the subset of the sequence and characters corresponding to neighbor keys of the keys corresponding to the respective input characters on the layout of the keyboard, wherein for each permutation: a respective character at a respective position in the permutation is either a corresponding input character at a corresponding position in the sequence of input characters or a character corresponding to an adjacent, neighbor key of the key corresponding to the corresponding input character in the predefined layout; and, after generating the set of strings: identifying in a dictionary one or more candidate words, each candidate word having a string in the set of strings as a prefix; scoring the candidate words; selecting a subset of the candidate words based on predefined criteria; and presenting the subset of the candidate words.