7. A system comprising: one or more servers configured to perform operations comprising: generating a first vector for one or more first n-grams of a first query and calculating a respective first semantic weight for each of the first n-grams based at least in part on an entropy of the particular first n-gram in which the entropy is estimated from a set of search queries; generating a second vector for one or more second n-grams of a second query and calculating a respective second semantic weight for each of the second n-grams; calculating a similarity measurement between the first query and the second query based on respective similarities of semantically weighted first n-grams to the second vector, and based on respective similarities of the semantically weighted second n-grams to the first vector; and wherein generating and calculating are performed by one or more computers.
7. A system comprising: one or more servers configured to perform operations comprising: generating a first vector for one or more first n-grams of a first query and calculating a respective first semantic weight for each of the first n-grams based at least in part on an entropy of the particular first n-gram in which the entropy is estimated from a set of search queries; generating a second vector for one or more second n-grams of a second query and calculating a respective second semantic weight for each of the second n-grams; calculating a similarity measurement between the first query and the second query based on respective similarities of semantically weighted first n-grams to the second vector, and based on respective similarities of the semantically weighted second n-grams to the first vector; and wherein generating and calculating are performed by one or more computers. 8. The system of claim 7 , in which calculating the first semantic weight for the first n-gram is based at least in part on an inverse document frequency (IDF) of the first n-gram.