thefuzz-parity
thefuzz-parity scores string similarity and ranks choices. It counts Unicode
scalar values for matcher indices, lengths, and slices. The crate has no runtime
dependencies. Not affiliated with SeatGeek or the thefuzz maintainers. Score
parity is a tested claim against thefuzz 0.22.1.
The scoring module provides base, partial, token, and weighted scorers. Text processing replaces characters outside Unicode letter and number categories with spaces, lowercases the result, and trims its ends. Interior space runs remain.
use ;
assert_eq!;
assert_eq!;
The process module ranks borrowed choices and returns each input string unchanged.
Cutoffs are inclusive. Equal unrounded scores retain input order.
use ;
let choices = ;
let matches = extract;
assert_eq!;
assert_eq!;
Duplicate removal chooses the longest member of each similarity group. A length tie selects the lexicographically greatest string. The output contains each representative once, ordered by the first input that selects it.
Compatibility
The minimum supported Rust version is 1.70.0. Version 0.1 uses the standard library and forbids unsafe code.
License
MIT