Patent Document ID: 9760559
Application ID: 14720655

Base Claim:
1. A method for text prediction comprising: at an electronic device: receiving a text input, the text input associated with an input context; determining, using a first language model, a first frequency of occurrence of an m-gram with respect to a first subset of a corpus, wherein the first subset is associated with a first context, and wherein the m-gram includes at least one word in the text input; determining, based on a degree of similarity between the input context and the first context, a first weighting factor, wherein a weighted first frequency of occurrence of the m-gram is obtained by applying the first weighting factor to the first frequency of occurrence of the m-gram; determining, using the first language model, a second frequency of occurrence of the m-gram with respect to a second subset of the corpus, wherein the second subset is associated with a second context; determining, based on a degree of similarity between the input context and the second context, a second weighting factor, wherein a weighted second frequency of occurrence of the m-gram is obtained by applying the second weighting factor to the second frequency of occurrence of the m-gram; and determining, based on the weighted first frequency of occurrence of the m-gram and the weighted second frequency of occurrence of the m-gram, a first weighted probability of a first predicted text given the text input, wherein the m-gram includes at least one word in the first predicted text.

---

Claim 5:
5. The method of claim 1 , further comprising: determining, using a second language model, a probability of the first predicted text given the text input; determining a second weighted probability of the first predicted text given the text input based on the first weighted probability of the first predicted text given the text input and the probability of the first predicted text given the text input.