Skip to content

[TEXT-103] Add support for weighted Levenshtein distance#737

Open
ron-ladin6 wants to merge 1 commit intoapache:masterfrom
ron-ladin6:TEXT-103
Open

[TEXT-103] Add support for weighted Levenshtein distance#737
ron-ladin6 wants to merge 1 commit intoapache:masterfrom
ron-ladin6:TEXT-103

Conversation

@ron-ladin6
Copy link

This PR adds support for weighted Levenshtein distance by allowing custom costs for insertion, deletion, and substitution operations.
Key Changes:

  • Added a new constructor to LevenshteinDistance for custom costs.
  • Implemented limitedCompareCustomCost to handle weights while maintaining memory efficiency ($O(\min(n, m))$).
  • Added comprehensive unit tests (reaching 99%+ code coverage).
  • Guaranteed 100% backward compatibility with existing logic.

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.

2 participants