TheFuzz v0.5.0 TheFuzz.Similarity.Overlap View Source
Implements the Overlap Similarity Metric
Link to this section Summary
Functions
Compares two values using the Overlap Similarity metric and returns the coefficient. It takes the ngram size as the third argument, and, if none is provided, assumes that you want to use 1.
Examples
iex> TheFuzz.Similarity.Overlap.compare("compare me", "to me")
0.8
iex> TheFuzz.Similarity.Overlap.compare("compare me", "to me", 2)
0.5
iex> TheFuzz.Similarity.Overlap.compare("or me", "me", 1)
1.0
Link to this section Functions
Link to this function
compare(a, b) View Source
Compares two values using the Overlap Similarity metric and returns the coefficient. It takes the ngram size as the third argument, and, if none is provided, assumes that you want to use 1.
Examples
iex> TheFuzz.Similarity.Overlap.compare("compare me", "to me")
0.8
iex> TheFuzz.Similarity.Overlap.compare("compare me", "to me", 2)
0.5
iex> TheFuzz.Similarity.Overlap.compare("or me", "me", 1)
1.0
Link to this function