Upgrade Levenshtein to Damerau-Levenshtein#1973
Merged
bcoe merged 12 commits intoyargs:masterfrom Jul 12, 2021
thrien:master
Merged
Upgrade Levenshtein to Damerau-Levenshtein#1973bcoe merged 12 commits intoyargs:masterfrom thrien:master
bcoe merged 12 commits intoyargs:masterfrom
thrien:master
Conversation
Allow for transpositions
Upgrade levenshtein to damerau-levenshtein
Member
|
@thrien thanks for the contribution 👏 , this code certainly hasn't been touched in a long time. |
Member
|
@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? |
Contributor
Author
|
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
approved these changes
Jul 12, 2021
Member
|
@thrien thank you for the contribution 👏 |
|
Thanks @thrien! |
This was referenced Nov 25, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minor improvement for convenience. The Damerau-Levenshtein distance considers transpositions (which are common in mistyped strings) as one edit.