14. A non-transitory computer-readable storage medium having executable computer program instructions embodied therein for generating a language model for analyzing probabilities of occurrence of text strings in a given domain, actions of the computer program instructions comprising: accessing a geographic database comprising: a plurality of geographic entities, each geographic entity corresponding to a geographic region and having one or more names, and a plurality of links between pairs of the geographic entities; accessing a query log comprising geographic queries previously entered by users, a plurality of the geographic queries including names of ones of the geographic entities in the geographic database; generating, from the query log, a template distribution quantifying probabilities that entity types of the geographic entities named in the geographic queries correspond to ones of a plurality of query templates, each query template comprising an ordered set of the entity types appearing in the geographic database; generating a geographic distribution from the query log quantifying probabilities of queries in the query log referencing ones of the geographic entities in the geographic database; generating the geographic language model from the template distribution and the geographic distribution, the geographic language model comprising a set of combinations of names of the geographic entities and associated scores, the scores based on probabilities of occurrence of the combinations in a geographic query; and storing the geographic language model on a computer readable storage device.
14. A non-transitory computer-readable storage medium having executable computer program instructions embodied therein for generating a language model for analyzing probabilities of occurrence of text strings in a given domain, actions of the computer program instructions comprising: accessing a geographic database comprising: a plurality of geographic entities, each geographic entity corresponding to a geographic region and having one or more names, and a plurality of links between pairs of the geographic entities; accessing a query log comprising geographic queries previously entered by users, a plurality of the geographic queries including names of ones of the geographic entities in the geographic database; generating, from the query log, a template distribution quantifying probabilities that entity types of the geographic entities named in the geographic queries correspond to ones of a plurality of query templates, each query template comprising an ordered set of the entity types appearing in the geographic database; generating a geographic distribution from the query log quantifying probabilities of queries in the query log referencing ones of the geographic entities in the geographic database; generating the geographic language model from the template distribution and the geographic distribution, the geographic language model comprising a set of combinations of names of the geographic entities and associated scores, the scores based on probabilities of occurrence of the combinations in a geographic query; and storing the geographic language model on a computer readable storage device. 15. The non-transitory computer-readable storage medium of claim 14 , the actions further comprising: computing conditional probabilities of occurrence of words in geographic queries based at least in part on the geographic language model; receiving a geographic query from a user; generating an alternative geographic query that is a variant of the received geographic query; computing a probability of occurrence of the received geographic query and a probability of occurrence of the alternative geographic query based at least in part on the computed conditional probabilities; and responsive to the probability of occurrence of the alternative geographic query being higher than the probability of occurrence of the received geographic query, providing the alternative geographic query to the user as an alternative query.