Jump to content

Levenshtein distance: Difference between revisions

(Add CLU)
Line 2,106:
Frink has a built-in function to calculate the Levenshtein edit distance between two strings:
<lang frink>println[editDistance["kitten","sitting"]]</lang>
It also has a function to calculate the Levenshtein-Damerau edit distance, <CODE>editDistanceDamerau[<I>str1</I>,<I>str2</I>]</CODE>. This is similar to the <CODE>editDistance</CODE> function but also allows ''swaps'' between two adjoining characters, which count as an edit distance of 1. This may make distances between some strings shorter, by say, treating transposition errors in a word as a less expensive operation than in the pure Levenshtein algorithm, and is generally more useful in more circumstances.
 
=={{header|FutureBasic}}==
494

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.