Akin.SubstringDoubleMetaphone (Akin v0.1.7) View Source

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}

Link to this section Summary

Functions

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

Link to this section Functions

Link to this function

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

View Source

Specs

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.