4 ms·
In the last release I added a module `rapidfuzz.levenshtein` which allows calculating a normal levenshtein distance and a weighted version where substitutions h
by maxbachmann 7y ago
In the last release I added a module `rapidfuzz.levenshtein` which allows calculating a normal levenshtein distance and a weighted version where substitutions have a weight of 2 (this one is actually used by FuzzyWuzzy for ratio calculations).
But when there is interest in other weighting options I can add a version that allows to pass in custom costs for insertions, deletions, and substitutions
- germanjoey 7y agoI am very interested in a version that allow you to pass in a custom substitution cost! It has a great use for OCR applications!
- edraferi 7y agoYeah that would be pretty cool. I’d be interested to use that to implement phonetic distance scoring.
- maxbachmann 7y agoWell then I will add it :)
- maxbachmann 7y ago`rapidfuzz.levenshtein.weighted_distance` does now support the three parameters `insert_cost`, `delete_cost` and `replace_cost`.