fuzzy_compare v1.0.0 FuzzyCompare.SortedChunks View Source

In order to match strings whose order might be the only thing separating them the sorted chunks metric is applied. This strategy splits the strings on spaces, sorts the list of strings, joins them together again, and then compares them by applying the Jaro-Winkler distance metric.

Examples

iex> FuzzyCompare.SortedChunks.standard_similarity("Oscar-Claude Monet", "Monet, Claude")
0.8958333333333334

iex> FuzzyCompare.SortedChunks.substring_similarity("Oscar-Claude Monet", "Monet, Claude")
1.0

Link to this section Summary

Link to this section Functions

Link to this function standard_similarity(left, right) View Source
Link to this function substring_similarity(left, right) View Source
substring_similarity(
  binary() | FuzzyCompare.Preprocessed.t(),
  binary() | FuzzyCompare.Preprocessed.t()
) :: float()