1. A method comprising: outputting, by a computing device and for display, a graphical keyboard comprising a plurality of keys; receiving, by the computing device, an indication of a first gesture detected at a presence-sensitive input device, the first gesture to select a first sequence of one or more keys from the plurality of keys; determining, by the computing device, a set of candidate strings based at least in part on characters associated with the first sequence of one or more keys; outputting, by the computing device and for display, at least one of the set of candidate strings; receiving, by the computing device, an indication of a second gesture detected at the presence-sensitive input device, the second gesture to select a second sequence of one or more keys from the plurality of keys; determining, by the computing device, whether characters associated with the second sequence of one or more keys are included in a first candidate word of a lexicon, the first candidate word being based at least in part on the characters associated with the first sequence of one or more keys, and: if the computing device determines that the characters associated with the second sequence of one or more keys are included in the first candidate word, modifying, by the computing device, the set of candidate strings based at least in part on the first candidate word, and if the computing device determines that the characters associated with the second sequence of one or more keys are not included in the first candidate word, modifying, by the computing device, the set of candidate strings based at least in part on a second candidate word of the lexicon, the second candidate word not being based on the characters associated with the first sequence of one or more keys; and outputting, by the computing device and for display, at least one of the modified set of candidate strings.
1. A method comprising: outputting, by a computing device and for display, a graphical keyboard comprising a plurality of keys; receiving, by the computing device, an indication of a first gesture detected at a presence-sensitive input device, the first gesture to select a first sequence of one or more keys from the plurality of keys; determining, by the computing device, a set of candidate strings based at least in part on characters associated with the first sequence of one or more keys; outputting, by the computing device and for display, at least one of the set of candidate strings; receiving, by the computing device, an indication of a second gesture detected at the presence-sensitive input device, the second gesture to select a second sequence of one or more keys from the plurality of keys; determining, by the computing device, whether characters associated with the second sequence of one or more keys are included in a first candidate word of a lexicon, the first candidate word being based at least in part on the characters associated with the first sequence of one or more keys, and: if the computing device determines that the characters associated with the second sequence of one or more keys are included in the first candidate word, modifying, by the computing device, the set of candidate strings based at least in part on the first candidate word, and if the computing device determines that the characters associated with the second sequence of one or more keys are not included in the first candidate word, modifying, by the computing device, the set of candidate strings based at least in part on a second candidate word of the lexicon, the second candidate word not being based on the characters associated with the first sequence of one or more keys; and outputting, by the computing device and for display, at least one of the modified set of candidate strings. 10. The method of claim 1 , wherein at least one candidate string of the set of candidate strings is associated with a cost value, and wherein the set of candidate strings includes only candidate strings associated with respective cost values that satisfy a threshold cost value.