module Edits::DamerauLevenshtein
Overview
Implemention of the Damerau/Levenshtein distance algorithm.
Determines distance between two strings by counting edits, identifying:
- Insertion
- Deletion
- Substitution
- Adjacent transposition
Defined in:
edits/damerau_levenshtein.crClass Method Summary
-
.distance(str1, str2) : Int
Calculate the Damerau/Levenshtein distance of two sequences.
Class Method Detail
def self.distance(str1, str2) : Int
#
Calculate the Damerau/Levenshtein distance of two sequences.
DamerauLevenshtein.distance("acer", "earn") # => 3