View Source Akin.SubstringDoubleMetaphone (Akin v0.2.0)

Tokenize the search terms into lists split by white space and compare the cartesian product of the lists.

Examples

iex> left = "Alice Liddel" iex> right = "Liddel, Alice" iex> Akin.compare(left, right, [algorithms: ["substring_double_metaphone"]]) %{double_metaphone: 1.0} iex> right = "Alice P Liddel" iex> Akin.compare(left, right, [algorithms: ["substring_double_metaphone"]]) %{substring_double_metaphone: 1.0} iex> right = "Alice Hargreaves" iex> Akin.compare(left, right, [algorithms: ["substring_double_metaphone"]]) %{substring_double_metaphone: 0.5}

Summary

Functions

Compares two lists of values phonetically and returns a boolean of whether they match reducing all possible matching levels.

Functions

Link to this function

compare(left, right, opts \\ [])

View Source
@spec compare(
  %Akin.Corpus{
    list: term(),
    original: term(),
    set: term(),
    stems: term(),
    string: term()
  },
  %Akin.Corpus{
    list: term(),
    original: term(),
    set: term(),
    stems: term(),
    string: term()
  },
  Keyword.t()
) :: float()

Compares two lists of values phonetically and returns a boolean of whether they match reducing all possible matching levels.