TheFuzz.Similarity.Overlap

Implements the Overlap Similarity Metric

Source

Summary

compare(a, b)

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
compare(a, b, n)

Functions

compare(a, b)

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
Source
compare(a, b, n)
Source