The following figure shows how the candidate words (possible correct words) can be generated (mostly the words within edit distance 1) and then a suitable language model can be used to estimate (with MLE) the prior and the likelihood (insertion / deletion etc.) probabilities from the training corpus.



The following figure shows the real world spelling correction methods using the noisy channel model, we are going to use these techniques to solve the spelling-correction problem. Given a k-word sentence W=w1,w2,…,wk, we are going to apply the following steps to compute the most probable sentence with the possibly-corrected misspelled–words:

For each word w_i generate the candidate set (e.g., the words that are withing 1-edit distance). Use a language model to compute the probability of a sequence P(W) and then find the most probable word-sequence W.

The following figure shows the different language models that are going to be used to compute the MLE (without / with smoothing) probabilities and also how they can be used to compute the probability of a sentence (i.e. a sequence of words).