Levenshtein and Metaphone
No, it’s not the title of an early 20th-century Russian play, but of a couple of word-comparison algorithms which I have implemented in Ruby. Both are fairly simple, though I was gratified to note that my Ruby implementation of Metaphone was about a third of the length of the Apache Group’s Java version.
Here they are: Levenshtein and Metaphone.