37. A system comprising: data processing apparatus programmed to perform operations comprising: identifying a plurality of electronic documents wherein each of the documents was referred to by one or more respective user selected search results wherein each of the user selected search results was responsive to a respective query; categorizing each of a plurality of the identified documents by associating the document with a respective category that is a hierarchical classification of the document; and associating one or more respective n-grams with each of one or more of the categorized documents, wherein the n-grams occur in one or more of the queries for which the selected search results that refer to the document were responsive; and creating a category graph based on the document categorizations and the associated n-grams.
38. The system of claim 37 wherein identifying the plurality of documents further comprises determining that a viewing time for the user selected search result exceeds a threshold.