Patent ID: 11860884
Assignee: SNAP INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 10:
11. A query generation system for assembling a database for query generation, the system comprising:
a receiving port that receives a query history log, the query history log including target queries and a mapping between each of the target queries and associated subqueries for each of the target queries;
a selection engine that selects one or more of the associated subqueries for a first target query based on a conditional probability exceeding a threshold for the associated subqueries of the first target query compared to matching associated subqueries of the other target queries and selects one or more of the associated subqueries for a second target query based on a conditional probability exceeding a threshold for the associated subqueries of the second target query compared to the matching associated subqueries of the other target queries;
a generation engine that stores the first target query and the selected one or more associated subqueries for the first target query in an in-memory data structure store for query generation;
a spelling module that identifies misspelling of the second target query wherein the spelling module orders the target queries by decreasing frequency from a most frequent target query to a least frequent target query and builds a dictionary by processing the ordered target queries starting with the most frequent target query by (i) adding a first frequency ordered target query to a dictionary, (ii) adding a second frequency ordered target query to the dictionary if the second frequency ordered target query does not include one or more spell corrections within a pre-specified edit distance with respect to the first frequency ordered target query or has a relative frequency with respect to the first frequency ordered target query that exceeding a threshold, and (iii) repeating step ii with a next most frequent frequency ordered target query until the least frequent target query is reached; and
a correction module that corrects the misspelling of the second target query.