Expand description
This library implements string similarity metrics.
Enums§
Functions§
- damerau_
levenshtein - Like optimal string alignment, but substrings can be edited an unlimited number of times, and the triangle inequality holds.
- hamming
- Calculates the number of positions in the two strings where the characters differ. Returns an error if the strings have different lengths.
- jaro
- Calculates the Jaro similarity between two strings. The returned value is between 0.0 and 1.0 (higher value means more similar).
- jaro_
winkler - Like Jaro but gives a boost to strings that have a common prefix.
- levenshtein
- Calculates the minimum number of insertions, deletions, and substitutions required to change one string into the other.
- normalized_
damerau_ levenshtein - Calculates a normalized score of the Damerau–Levenshtein algorithm between 0.0 and 1.0 (inclusive), where 1.0 means the strings are the same.
- normalized_
levenshtein - Calculates a normalized score of the Levenshtein algorithm between 0.0 and 1.0 (inclusive), where 1.0 means the strings are the same.
- osa_
distance - Like Levenshtein but allows for adjacent transpositions. Each substring can only be edited once.