damerau_levenshtein_normalized_distance | R Documentation |
Calculate the normalized Damerau-Levenshtein distance between two strings.
Computes the normalized Damerau-Levenshtein distance, where the result is between 0.0 (identical) and 1.0 (completely different).
damerau_levenshtein_normalized_distance(s1, s2, score_cutoff = 1)
s1 |
A string. The first input string. |
s2 |
A string. The second input string. |
score_cutoff |
An optional maximum threshold for the normalized distance. Defaults to 1.0. |
The normalized Damerau-Levenshtein distance as a double.
damerau_levenshtein_normalized_distance("abcdef", "abcfde")
damerau_levenshtein_normalized_distance("abcdef", "abcfde", score_cutoff = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.