pub struct SorensenDice(_);
Sorensen-Dice coefficient algorithm.
Create a new instance of this algorithm. It's recommended to keep a single instance around as long as possible, as this allows any temporary storage to be recycled without additional allocations. Read more
Gets the similarity of a given pair of strings using this algorithm. Two identical strings will always produce 1.0
, and mismatching length 1 strings produce 0.0
. If either string is empty, 0.0
will be returned. Implementations within the crate round the weight to 5 decimal places, but other implementations don't need to do the same. Read more