How to Write a Spelling Corrector

http://norvig.com/spell-correct.html