Patent attributes
A method and a system for ranking candidates in an input method are provided. The method comprises: receiving an initial key code string inputted by a user using an input method; for each character in the initial key code string, obtaining a weight of the character and weights of characters surrounding the character, and establishing a key code string weight list with a corresponding hierarchy according to a character input order. The method further comprises: when character combinations are obtained from a dictionary, according to a correspondence relationship between a hierarchy in the input method dictionary and the hierarchy in the key code string weight list, determining weights of the character combinations using the key code string weight list; and based on the weights of the character combinations, ranking candidates corresponding to the character combinations.