D. E. Shaw How Autocorrect is implemented Damerau Levenshtein Distance BK Trees Peter Norwig's article on how to implement a spell checker