Compute the Levenshtein distance between two character strings (the minimal number of insertions, deletions or replacements required to transform one string into the other)
Usage
levenshtein.distance(xsource, targets)
Arguments
xsource
A character string to compute the Levenshtein distance from.
targets
A list of words to compute the Levenshtein distance to. Must be of type character, or convertible to type character with as.character.
Details
The distance computation is performed by stringdist with method="lv".
Value
An integer vector containing Levenshtein distances, with names corresponding to targets.
Author(s)
Emmanuel Keuleers
References
Levenshtein, V. I. (1966, February). Binary codes capable of correcting deletions, insertions and reversals. In Soviet physics doklady (Vol. 10, p. 707).