1. A computer-implemented method comprising: determining that a first query is associated with a first query category; detecting a first entity text in the first query; mapping the first entity text to a first entity category at least partially in response to: (a) determining that the first entity text is among a plurality of entity texts that are mapped to an entity of a plurality of entities, wherein a plurality of other entity texts are mapped to a plurality of other entities of the plurality of entities, and (b) determining that the entity is mapped to the first entity category; determining a first keyword text that occurs in the first query in addition to the first entity text; determining that a second query comprises said first keyword text and a second entity text in said first entity category; based at least in part on said determining that the second query comprises said first keyword text and the second entity text in said first entity category, storing information that indicates that the second query is associated with said first query category; storing a plurality of annotated queries in association with a plurality of query categories, wherein each annotated query of the plurality of annotated queries comprises a pair of at least a keyword text and an entity category, and wherein each annotated query represents one or more queries of a set of queries; for each annotated query of the plurality of annotated queries, determining an accuracy value for the annotated query based at least in part on a frequency by which the annotated query refers to a query category associated with the annotated query relative to a number of times the annotated query occurs in the set of queries; selecting one or more annotated queries of the plurality of annotated queries based at least in part on the accuracy value determined for the one or more annotated queries; wherein the method is performed by one or more computing devices.