8. A system comprising: a machine-readable memory device or storage device storing instructions; and a hardware processor configured to execute the instructions, wherein the instructions, when executed by the hardware processor, cause the hardware processor to: select, from a query log stored in a database, a first query associated with a first set of Uniform Resource Locators (URLs) returned by a search engine responsive to the first query and a second query associated with a second set of URLs returned by the search engine responsive to the second query; measure a click similarity between the first query and the second query, the click similarity being measured based on similarity of first click behavior of users with respect to the first set of URLs to second click behavior of the users with respect to the second set of URLs; measure first mutual information values between first phrases and first tags of the first query based on the first click behavior, wherein the first phrases and the first tags comprise different tokens of the first query; measure second mutual information values between second phrases and second tags of the second query based on the second click behavior, wherein the second phrases and the second tags comprise different tokens of the second query; measure a tag similarity between the first query and the second query using the first mutual information values and the second mutual information values; determine whether the first query and the second query are synonyms using both the click similarity and the tag similarity; and when the first query and the second query are determined to be synonyms, store the second query as a query synonym of the first query.
8. A system comprising: a machine-readable memory device or storage device storing instructions; and a hardware processor configured to execute the instructions, wherein the instructions, when executed by the hardware processor, cause the hardware processor to: select, from a query log stored in a database, a first query associated with a first set of Uniform Resource Locators (URLs) returned by a search engine responsive to the first query and a second query associated with a second set of URLs returned by the search engine responsive to the second query; measure a click similarity between the first query and the second query, the click similarity being measured based on similarity of first click behavior of users with respect to the first set of URLs to second click behavior of the users with respect to the second set of URLs; measure first mutual information values between first phrases and first tags of the first query based on the first click behavior, wherein the first phrases and the first tags comprise different tokens of the first query; measure second mutual information values between second phrases and second tags of the second query based on the second click behavior, wherein the second phrases and the second tags comprise different tokens of the second query; measure a tag similarity between the first query and the second query using the first mutual information values and the second mutual information values; determine whether the first query and the second query are synonyms using both the click similarity and the tag similarity; and when the first query and the second query are determined to be synonyms, store the second query as a query synonym of the first query. 9. The system of claim 8 , wherein the first tags and the second tags comprise context words that appear with the first phrases in the first query and that also appear with the second phrases in the second query.