rapidfuzz / strsim-rs

:abc: Rust implementations of string similarity metrics

Home Page:https://crates.io/crates/strsim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a law-abiding version of Damerau-Levenshtein distance

lambda-fairy opened this issue · comments

There are two versions of the Damerau-Levenshtein distance. It looks like strsim only provides the first version, which is not a formal metric. It would be nice if strsim provides the second version as well, as this version does have the metric property.

As for why I need this: I'd like to use this library with a BK-tree, which needs a metric to work.

Cool! I'll take a look at what implementing the second version will take once I have some more free time.

Sorry for the delay. The implementation should be fixed now, and the original implementation has been renamed to osa_distance. It's published on Crates as version 0.6.0.