26. A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by one or more computers cause the one or more computers to perform operations comprising: receiving a pair of words; generating a word-form score for the pair of words based on a consistency of the pair of words with word-form rules, wherein a word-form rule indicates how words with a common portion can vary; and determining that the pair of words is a synonym pair based at least on the generated word-form score; and generating an alternative search query for a search query that includes one of the words of the pair of words using another word of the pair of words.
30. The computer program product of claim 26 , wherein the operations further comprise: determining a co-occurrence frequency for the pair of words in a collection of documents; and determining that the pair of words are synonyms based at least on the determined co-occurrence frequency.