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

Upgrade Levenshtein to Damerau-Levenshtein #1973

Merged
merged 12 commits into from Jul 12, 2021
Merged

Upgrade Levenshtein to Damerau-Levenshtein #1973

merged 12 commits into from Jul 12, 2021

Conversation

thrien
Copy link
Contributor

@thrien thrien commented Jun 22, 2021

Minor improvement for convenience. The Damerau-Levenshtein distance considers transpositions (which are common in mistyped strings) as one edit.

@bcoe
Copy link
Member

bcoe commented Jun 29, 2021

@thrien thanks for the contribution 👏 , this code certainly hasn't been touched in a long time.

@bcoe
Copy link
Member

bcoe commented Jul 10, 2021

@thrien tests are failing due to a slight drop in coverage, it looks like line 57 of the new algorithm isn't exercised. Could we add a test case?

@thrien
Copy link
Contributor Author

thrien commented Jul 10, 2021

Line 57 is the new case that counts as one edit (transposition). So it makes sense that it doesn't get tested.

I will try to add a test, even though i don't really know how tests work.

@bcoe
Copy link
Member

bcoe commented Jul 12, 2021

@thrien thank you for the contribution 👏

@bcoe bcoe merged commit d2c121b into yargs:master Jul 12, 2021
@mrlubos
Copy link

mrlubos commented Aug 6, 2021

Thanks @thrien!

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 this pull request may close these issues.

None yet

3 participants