TheFuzz.Similarity.Levenshtein (TheFuzz v0.6.0)

View Source

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

Summary

Functions

Calculates the levenshtein distance between two given strings.

Functions

compare(a, b)

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