TheFuzz v0.5.0 TheFuzz.Similarity.Levenshtein View Source

This module contains functions to calculate the levenshtein distance between given strings.

Link to this section Summary

Functions

Calculates the levenshtein distance between two given strings

Link to this section 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