Skip to content

Upgrade Levenshtein to Damerau-Levenshtein#1973

Merged
bcoe merged 12 commits intoyargs:masterfrom
thrien:master
Jul 12, 2021
Merged

Upgrade Levenshtein to Damerau-Levenshtein#1973
bcoe merged 12 commits intoyargs:masterfrom
thrien:master

Conversation

@thrien
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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.

3 participants