1. A method performed by data processing apparatus, the method comprising: receiving a plurality of tokens, the plurality of tokens comprising a first n-gram, and the first n-gram being composed of a first number of atomic units; and segmenting, by one or more computers, the plurality of tokens into one or more words based at least in part on a scaled probability of the first n-gram identifying a word, the scaled probability being determined by adjusting an initial probability of the n-gram identifying a word based at least in part on the first number of atomic units.