Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/levenshtein.damerau.distance.R
Compute the Levenshtein-Damerau distance between two character strings (the minimal number of insertions, deletions replacements, or transpositions required to transform one string into the other)
1 | levenshtein.damerau.distance(xsource, targets)
|
xsource |
A character string to compute the Levenshtein-Damerau distance from. |
targets |
A list of words to compute the Levenshtein-Damerau distance to. Must be of type |
The distance computation is performed by stringdist with method="osa". Note that this function computes the restricted Levenshtein-Damerau distance instead of the unrestricted version.
An integer vector containing Restricted Levenshtein-Damerau distances, with names corresponding to targets.
Emmanuel Keuleers
Damerau, F. J. (1964). A technique for computer detection and correction of spelling errors. Communications of the ACM, 7(3), 171—176.
levenshtein.neighbors,levenshtein.distance, stringdist, ald
1 2 | data(french.words)
levenshtein.damerau.distance('pourquoi',sample(french.words,20))
|
Loading required package: stringdist
sh: 1: wc: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Could not detect number of cores, defaulting to 1.
Loading required package: lattice
Loading required package: latticeExtra
Loading required package: RColorBrewer
braque f<U+00E9>es quitteras
6 8 9
clouez usufruit aga<U+00E7>ait
7 6 8
supplia vitup<U+00E9>rant r<U+00E9><U+00E9>coutent
7 9 9
caboulot sarroise inclina
7 7 8
roncet meurtrie minimum
7 6 7
sp<U+00E9>cialis<U+00E9>es gueux incessamment
11 6 12
masturb<U+00E9> supposable
8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.