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 to apply to the first frequency of occurrence of the m-gram; and determining, based on the first frequency of occurrence of the m-gram and the first weighting factor, 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.