Damerau-Levenshtein distance implementation and test