it is important to automatically correct or suggest a corrected version of the mistyped words. We can identify the correct word in the following way. For a given mistyped word w, we can generate multiple candidate words that could be correct, and evaluate each candidate c using the Bayes' rule.
Fig: 1