1. A computer-implemented method, comprising: under control of a device comprising one or more processors configured with executable instructions, receiving at a graphical user interface of the device, user selection of a sample electronic text; identifying multiple sample n-grams of the sample electronic text; for a first language: identifying a first set of n-grams that occur in a first language reference corresponding to the first language; calculating a first set of Bayesian probabilities, including calculating a first Bayesian probability based at least in part on a frequency of occurrence, in the first set of n-grams, of a first sample n-gram of the multiple sample n-grams; and calculating a first average of the first set of Bayesian probabilities; for a second language: identifying a second set of n-grams that occur in the second language reference corresponding to the second language; calculating a second set of Bayesian probabilities, including calculating a second Bayesian probability based at least in part on a frequency of occurrence, in the second set of n-grams, of a second sample n-gram of the multiple sample n-grams; and calculating a second average of the second set of Bayesian probabilities; comparing at least the first average and the second average; determine a language of the sample electronic text based at least in part on the comparing at least the first average and the second average; determining a meaning of a word of the sample electronic text in a dictionary of the language; and presenting the meaning of the word on a display of the device.
1. A computer-implemented method, comprising: under control of a device comprising one or more processors configured with executable instructions, receiving at a graphical user interface of the device, user selection of a sample electronic text; identifying multiple sample n-grams of the sample electronic text; for a first language: identifying a first set of n-grams that occur in a first language reference corresponding to the first language; calculating a first set of Bayesian probabilities, including calculating a first Bayesian probability based at least in part on a frequency of occurrence, in the first set of n-grams, of a first sample n-gram of the multiple sample n-grams; and calculating a first average of the first set of Bayesian probabilities; for a second language: identifying a second set of n-grams that occur in the second language reference corresponding to the second language; calculating a second set of Bayesian probabilities, including calculating a second Bayesian probability based at least in part on a frequency of occurrence, in the second set of n-grams, of a second sample n-gram of the multiple sample n-grams; and calculating a second average of the second set of Bayesian probabilities; comparing at least the first average and the second average; determine a language of the sample electronic text based at least in part on the comparing at least the first average and the second average; determining a meaning of a word of the sample electronic text in a dictionary of the language; and presenting the meaning of the word on a display of the device. 2. The computer-implemented method of claim 1 , wherein calculating the first average of the first set of Bayesian probabilities comprises calculating a product of (a) the first Bayesian probability, and (b) a number of times the first sample n-gram occurs in the sample electronic text.