rapidfuzz / strsim-rs

:abc: Rust implementations of string similarity metrics
https://crates.io/crates/strsim
MIT License
409 stars 39 forks source link

Add a law-abiding version of Damerau-Levenshtein distance #8

Closed lambda-fairy closed 7 years ago

lambda-fairy commented 8 years ago

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.

dguo commented 8 years ago

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

dguo commented 7 years ago

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.