TheFuzz v0.5.0 TheFuzz.Similarity.JaroWinkler View Source

Calculates the Jaro-Winkler Distance between two strings.

Link to this section Summary

Functions

Calculates the Jaro-Winkler distance between two strings.

Examples

iex> TheFuzz.Similarity.JaroWinkler.compare("abc", "")
nil
iex> TheFuzz.Similarity.JaroWinkler.compare("abc", "xyz")
0.0
iex> TheFuzz.Similarity.JaroWinkler.compare("compare me", "compare me")
1.0
iex> TheFuzz.Similarity.JaroWinkler.compare("natural", "nothing")
0.5714285714285714

Link to this section Functions

Link to this function

compare(string1, string2) View Source

Calculates the Jaro-Winkler distance between two strings.

Examples

iex> TheFuzz.Similarity.JaroWinkler.compare("abc", "")
nil
iex> TheFuzz.Similarity.JaroWinkler.compare("abc", "xyz")
0.0
iex> TheFuzz.Similarity.JaroWinkler.compare("compare me", "compare me")
1.0
iex> TheFuzz.Similarity.JaroWinkler.compare("natural", "nothing")
0.5714285714285714