15. One or more non-transitory storage media encoded with a computer program, the computer program comprising instructions that when executed by one or more computers cause the one or more computers to perform operations comprising: receiving a first query; receiving a second, follow-up query; determining that a pronoun in the second, follow-up query is an anaphor by determining that the pronoun refers to an entity that is not present in the second, follow-up query; in response to determining that the pronoun in the second, follow-up query is an anaphor, determining that the first query is associated with a plurality of possible entities; generating a plurality of candidate queries, wherein each candidate query of the plurality of candidate queries is generated by replacing the pronoun in the second, follow-up query with a corresponding possible entity; ranking, using at least past query logs stored in a data repository, the plurality of candidate queries; and providing a highest-ranked candidate query of the plurality of candidate queries to a search engine and obtaining search results for the highest-ranked candidate query from the search engine.
19. The non-transitory storage media of claim 15 , the operations further comprising: determining that the highest-ranked candidate query is ranked higher than the second, follow-up query; and providing the highest-ranked candidate query to the search engine in response to determining that the highest-ranked candidate query is ranked higher than the second, follow-up query.