1. A method comprising: receiving, by a device, an indication of a gesture input at a portion of a presence-sensitive surface associated with a virtual keyboard, the virtual keyboard comprising a set of virtual keys, each virtual key from the set of virtual keys being associated with a region of the presence-sensitive surface; defining, by the device, a series of input points that represent a path of the gesture input across the virtual keyboard; defining, by the device, respective sets of anchor points corresponding to respective words in a set of candidate words, each of the anchor points corresponding to a location of the presence-sensitive surface associated with a virtual key from the set of virtual keys; identifying, by the device, for each respective anchor point in each of the sets of anchor points, a respective relevant input point in the series of input points; determining, by the device, a respective distance score for each respective anchor point in the sets of anchor points, wherein for each respective anchor point in the sets of anchor points, the respective distance score for the respective anchor point is based at least in part on a distance on the presence-sensitive surface between the respective anchor point and the respective relevant input point for the respective anchor point, wherein determining the respective distance score for each respective anchor point in each respective set of anchor points comprises adjusting, by the device, the respective distance score for the respective anchor point in response to determining that the respective anchor point is not a closest one of the anchor points in the respective set of anchor points to the respective relevant input point for the respective anchor point; and identifying, by the device, based at least in part on the respective distance scores for the respective anchor points, a word in the set of candidate words that corresponds to the gesture input.