TheFuzz.Similarity.Levenshtein
This module contains functions to calculate the levenshtein distance between given strings.
Summary
compare(a, b) | Calculates the levenshtein distance between two given strings |
Functions
Calculates the levenshtein distance between two given strings.
Note: All operations [INSERT, DELETE, REPLACE/SUBSTITUTE] are considered with a cost of 1. For custom weights and limited operations use WeightedLevenshtein
Examples
iex> TheFuzz.Similarity.Levenshtein.compare("saturday", "sunday")
3
iex> TheFuzz.Similarity.Levenshtein.compare("book", "back")
2