21. A computer-implemented method, comprising: storing specialization data, the specialization data associating each of a plurality of text queries with one or more query specializations identified from the text query, wherein each query specialization is the text of one of the text queries modified so that an n-gram in the text of the text query is replaced by entity text from a class-instance pair having class text matching the n-gram, and wherein the class-instance pairs are generated by: obtaining a plurality of class instance pairs derived from a plurality of documents by applying one or more extraction patterns to the plurality of documents, each class-instance pair comprising class text naming an entity class and entity text naming a particular instance of the entity class; and calculating a weight for each class-instance pair according to a frequency score and a diversity score for the class-instance pair, wherein the frequency score of the class-instance pair is based on a number of times the class-instance pair was derived from the plurality of documents, and wherein the diversity score of the class-instance pair is based on a number of distinct extraction patterns used to extract the class-instance pair; and wherein each query specialization is generated from a respective text query by: extracting a plurality of n-grams from the text query and extracting a respective context for each extracted n-gram from the text query, the respective context for an extracted n-gram including a prefix context and a suffix context; comparing the extracted n-grams to the class text of the class-instance pairs; identifying an n-gram that matches class text of a first class-instance pair; and generating the query specialization from the entity text of the first class-instance pair and the respective context for the identified n-gram; and receiving a partial query entered by a user; obtaining one or more candidate queries that are completions of the partial query; identifying, in the specialization data, one or more query specializations for one or more of the obtained candidate queries; and presenting query suggestions to the user, the query suggestions that include one or more of the obtained candidate queries and one or more of the identified query specializations.
21. A computer-implemented method, comprising: storing specialization data, the specialization data associating each of a plurality of text queries with one or more query specializations identified from the text query, wherein each query specialization is the text of one of the text queries modified so that an n-gram in the text of the text query is replaced by entity text from a class-instance pair having class text matching the n-gram, and wherein the class-instance pairs are generated by: obtaining a plurality of class instance pairs derived from a plurality of documents by applying one or more extraction patterns to the plurality of documents, each class-instance pair comprising class text naming an entity class and entity text naming a particular instance of the entity class; and calculating a weight for each class-instance pair according to a frequency score and a diversity score for the class-instance pair, wherein the frequency score of the class-instance pair is based on a number of times the class-instance pair was derived from the plurality of documents, and wherein the diversity score of the class-instance pair is based on a number of distinct extraction patterns used to extract the class-instance pair; and wherein each query specialization is generated from a respective text query by: extracting a plurality of n-grams from the text query and extracting a respective context for each extracted n-gram from the text query, the respective context for an extracted n-gram including a prefix context and a suffix context; comparing the extracted n-grams to the class text of the class-instance pairs; identifying an n-gram that matches class text of a first class-instance pair; and generating the query specialization from the entity text of the first class-instance pair and the respective context for the identified n-gram; and receiving a partial query entered by a user; obtaining one or more candidate queries that are completions of the partial query; identifying, in the specialization data, one or more query specializations for one or more of the obtained candidate queries; and presenting query suggestions to the user, the query suggestions that include one or more of the obtained candidate queries and one or more of the identified query specializations. 22. The method of claim 21 , further comprising determining an order for the query suggestions and presenting the query suggestions according to the order.