Patent ID: 8918416

Claim:
A method comprising: obtaining a collection of search queries; for each query in the collection of search queries, determining whether other queries in the collection of search queries are refinements of the query, wherein the refinements of each query include the query terms and one or more additional terms not found in the query; and for a group of queries determined to have one or more refinements: determining a similarity between pairs of queries in the group, wherein the similarity between a given query pair is determined using the additional query terms from the refinements of the respective search queries of the query pair; obtaining a sample group of labeled search queries from the group of queries determined to have one or more refinements, wherein each labeled search query in the sample group includes a corresponding category label that was previously assigned to the search query from a collection of category labels; and classifying each search query of the group of queries determined to have one or more refinements with one or more of the category labels including, for each search query: using the determined similarity between pairs of queries in the group to determine a specified number of labeled search queries in the sample group that are nearest to the query according to a distance metric, and using the nearest labeled search queries to determine the classification of the search query.