How to Write a Spelling Corrector
This is a beautiful example of pithy high-level coding. I feel compelled to mention, however, that the example word, 'thew', is in fact a(n archaic) English word: https://www.google.com.au/#q=thew :P