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 distances Bug #268

Open
ibuda opened this issue Apr 7, 2019 · 0 comments · Fixed by OpenG2P/Duke#1
Open

Levenshtein distances Bug #268

ibuda opened this issue Apr 7, 2019 · 0 comments · Fixed by OpenG2P/Duke#1

Comments

@ibuda
Copy link

ibuda commented Apr 7, 2019

Found a bug in Levenshtein and WegihtedLevenshtein distances implementations.
In more details, the following methods give wrong #results:
Levenshtein.distance("abc", "a"): Expected: 2, Actual: 1
Levenshtein.distance("a", "abc") : Expected: 2, Actual: 1
WeightedLevenshtein.distance("a2c3e", "1b1d1", e): Expected: 8, Actual: WeightedLevenshtein.distance("a", "abc", e): Expected: 2, Actual: 1

This error is caused by a mistake in the implementation of Levenshtein distances.
Having studied the list of open issues, this bug causes #239 and #244.

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

Successfully merging a pull request may close this issue.

1 participant