TheFuzz v0.3.0 TheFuzz.Similarity.Overlap
Implements the Overlap Similarity Metric
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
TheFuzz.Similarity.Overlap.compare("compare me", "to me", 2)
0.8
iex> TheFuzz.Similarity.Overlap.compare("or me", "me", 1)
1.0
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
TheFuzz.Similarity.Overlap.compare("compare me", "to me", 2)
0.8
iex> TheFuzz.Similarity.Overlap.compare("or me", "me", 1)
1.0