Name

Damerau_Levenshtein_Distance - calculate an "edit distance" between two strings that accounts for deletion, insertion, substitution as well as transposition

Usage

Input

str1
first string (or list of numbers)
str2
second string; it doesn't need to have the same length as the first string


Output

distance
the edit distance between the strings


Reference

The following is a good description (also gives pseudo code): http://en.wikipedia.org/wiki/Levenshtein_distance

Author / Maintainer

P. R. Baldwin

Keywords

category 1
UTILITIES

Files

contained in utilities.py

Maturity

stable
works for most people, has been tested.

Bugs

None detected so far.

Damerau Levenshtein Distance (last edited 2006-12-11 09:59:42 by Philip Baldwin)