1. A method for determining a set of rules for ordering text of a language, said method comprising: receiving information that indicates a target order of sets of characters in text of a language; determining strengths of differences between the characters based on the target order; identifying strings of characters that were sorted in the target order as a shorter string of characters; identifying strings of characters that were sorted in the target order as a longer string of characters; and determining a set of rules for ordering text of the language based on the strengths of differences between the characters, the identified strings of characters that were sorted in the target order as a shorter string, and the identified strings of characters that were sorted in the target order as a longer string.