AustinScola / seligimus

A mono-library.
MIT License
1 stars 0 forks source link

Levenshtein distance is wrong #195

Open AustinScola opened 3 years ago

AustinScola commented 3 years ago

The Levenshtein distance is returning zero if either string is empty, but it should be returning the length of the other string. See the wikipedia page.

Example:

assert levenshtein_distance('foo', '') == 3
assert levenshtein_distance('', 'bar') == 3