The Levenshtein Distance algorithm finds the minimum number of operations needed to transform one string into the other, where an operation is an insertion, deletion, or substitution of a single character.

This public domain Common Lisp implementation of the Levenshtein Distance was converted to Common Lisp from the Scheme example given in Wikipedia.

Levenshtein is ASDF-installable.

ASDF-install package (obsolete) http://abstractnonsense.com/levenshtein-1.0.tgz

Soundex may also be of interest for those wanting to sort or compare words.

Topics: text