GlobalNamesArchitecture / damerau-levenshtein

Calculates edit distance using Damerau-Levenshtein algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not handle non-alphanumerics properly

Muon opened this issue · comments

irb(main):001:0> require 'damerau-levenshtein'
=> true
irb(main):002:0> DamerauLevenshtein.distance('abc', '-')
=> 0

It does not seem to be an issue with nonalphanumeric characters, but rather a case of #2 where one of the strings is a single character.