Crate text_distance

Source

Structsยง

DamerauLevenshtein
Calculate the Damerau-Levenshtein distance between two strings. The Damerau-Levenshtein distance is a string metric for measuring edit distance between two sequences. The Damerau-Levenshtein distance differs from the Levenshtein distance by including transpositions as a single edit operation. For more information see wikipedia article
Hamming
Calculate the Hamming distance between two strings of equal length. The Hamming distance is the number of differing items in ordered sequences. For more information see wikipedia article
Jaccard
Calculate the Jaccard index between two sets. The Jaccard index between two words/chars/ngrams is the intersection divided by the union. For more information see wikipedia article
JaroWinkler
Calculate the Jaro or Jaro-Winkler similarity between two strings. The Jaro-Winkler similarity is the modification of the Jaro similarity. It increases the score if the characters at the start of both strings are the same. For more information see wikipedia article
Levenshtein
Calculate the Levenshtein distance between two strings. The Levenshtein distance between two words is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one word into the other. For more information see wikipedia article