Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Levenshtein comparator: compactDistance and distance methods produces absolutely different results #239

Open
knetkachou opened this issue Jan 24, 2017 · 0 comments

Comments

@knetkachou
Copy link

I've downloaded sources and saw"compactDistance" is default method used in in Levenshtein comparator.
"distance" method described as original, naive implementation, using the Wagner & Fischer algorithm from 1974.

Comparing two strings "emma" and "ema".

When using default "compactDistance" in compare method it returns 0 (dist=0) and I receive result 1 from comparator. So it supposes those strings are exactly the same but they are not.

When using "distance" method it returns 1 and I receive result 0.6666666666666667 from comparator. I think it's good.

So does the "compactDistance" method work incorrectly?

ibuda pushed a commit to ibuda/Duke that referenced this issue Apr 7, 2019
…shtein distance. Added new test cases that spotted the bug in the implementation. This fixes larsga#268, along with larsga#239 and larsga#244.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant