Patent Document ID: 10127220
Application ID: 14845180

Base Claim:
1. A non-transitory computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by one or more processors of an electronic device, cause the electronic device to: receive user input including an n-gram; generate, from the user input, a representation of the n-gram; generate, using the representation of the n-gram, a similarity between a representation of the n-gram and a representation of a first language, wherein the representation of the first language is based on an occurrence of each of a plurality of n-grams in the first language and an occurrence of each of the plurality of n-grams in a second language; determine whether the similarity between the representation of the n-gram and the representation of the first language satisfies a threshold; and in accordance with a determination that the similarity between the representation of the n-gram and the representation of the first language does not satisfy the threshold, display a user interface to allow a user to specify a language of the user input.

---

Claim 5:
5. The non-transitory computer-readable storage medium of claim 1 , wherein the instructions, which when executed by the one or more processors of the electronic device, further cause the electronic device to: in accordance with a determination that the similarity between the representation of the n-gram and the representation of the first language does not satisfy the threshold, display a first affordance that, when activated, causes the first language to be selected; and display a second affordance that, when activated, causes the second language to be selected.