Patent Document ID: 10095683
Application ID: 14684125

Base Claim:
1. A method comprising, by one or more computing devices: receiving, from a client system of a first user of an online social network, a search query comprising one or more n-grams; determining, based on a contextual speller model, that at least one n-gram of the one or more n-grams is misspelled, wherein the contextual speller model is based at least on a standard language model and a personal language model customized for the first user based on social-networking data associated with the first user; identifying, for each misspelled n-gram, one or more variant-tokens based at least on the search query and the contextual speller model; generating one or more unique combinations of the n-grams and variant-tokens, wherein each unique combination comprises a variant-token corresponding to each misspelled n-gram; calculating a relevance-score for each unique combination based at least in part on the search query and the contextual speller model, wherein the relevance-score for a unique combination is based on a comparison of a probability associated with the n-grams or variant tokens of the unique combination in the standard language model of the contextual speller model to a probability associated with the n-grams or variant tokens of the unique combination in the personal language model of the contextual speller model; generating one or more corrected queries, each corrected query comprising a unique combination having a relevance-score greater than a threshold relevance-score; and sending, to the client system of the first user for display in response to receiving the search query, one or more of the corrected queries.

---

Claim 5:
5. The method of claim 1 , wherein calculating the relevance-score for each unique combination based at least in part on the search query and the contextual speller model comprises: accessing, for each variant-token of the unique combination, the contextual speller model to determine a probability of the variant-token being correctly-spelled; and calculating the relevance-score for the unique combination based at least on one or more of the determined probabilities corresponding to the variant-tokens of the unique combination.