README
A generic implementation of the Levenshtein distance that allows arbitrarily weighting operations for different elements.
Generic
This crate can work on slices of any kind. It can:
- Compute a distance in characters between two strings:
assert_eq!;
- Compute a distance in words between two strings:
assert_eq!;
- Or compute a distance between arbitrary sequences:
assert_eq!;
Weighting
This crate allows defining custom weights for each operation on each symbol.
These weights can be specified for custom types by implementing the EditWeight
trait.
For example:
assert_eq!