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

Claim 14:
15. A non-transitory processor-readable storage medium storing processor-executable instructions that, when executed by a processor of a machine, cause the machine to perform operations comprising:
creating a query history log by receiving a data stream including query events within query sessions, each query session including a character string, each query event including a user identifier and a session identifier and partitioning the query events by user identifier and session identifier, 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;
selecting 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;
including the first target query and the selected one or more associated subqueries for the first target query in a database for query generation;
selecting 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;
identifying misspelling of the second target query by ordering the target queries by decreasing frequency from a most frequent target query to a least frequent target query, building a dictionary by processing the ordered target queries starting with a most frequent target query as follows:
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
correcting the misspelling of the second target query.