GlobalNamesArchitecture / damerau-levenshtein

Calculates edit distance using Damerau-Levenshtein algorithm
MIT License
144 stars 19 forks source link

Does not handle non-alphanumerics properly #1

Closed Muon closed 12 years ago

Muon commented 12 years ago
irb(main):001:0> require 'damerau-levenshtein'
=> true
irb(main):002:0> DamerauLevenshtein.distance('abc', '-')
=> 0
dimus commented 12 years ago

It does not seem to be an issue with nonalphanumeric characters, but rather a case of https://github.com/GlobalNamesArchitecture/damerau-levenshtein/issues/2 where one of the strings is a single character.