View Source MatchEngine.Levenshtein (match_engine v1.6.1)
The implementation of the Levenshtein distance metric.
Inlined from the Simetric library.
Summary
Functions
Returns an integer representing the minimum number of
single-character edits (i.e. insertions, deletions or substitutions)
required to change string1
into the string2
.
Functions
@spec compare(String.t(), String.t()) :: non_neg_integer()
Returns an integer representing the minimum number of
single-character edits (i.e. insertions, deletions or substitutions)
required to change string1
into the string2
.
Examples
iex> MatchEngine.Levenshtein.compare("kitten", "sitting")
3