damerauLevenshteinDistance: Calculate the Damerau Levenshtein Distance between two...

Description Usage Arguments Value References

Description

The restricted Damerau Levenshtein Distance between two strings is commonly used for checking typographical errors in strings. It takes the deletion and insertion of a character, a wrong character (substition) or the swapping (transposition) of two characters into account. By default these operations each account for distance 1.

Usage

1
damerauLevenshteinDistance(sa, sb, w = c(1, 1, 1, 1))

Arguments

sa

character vector

sb

character vector of equal length(sa)

w

integer vector for cost of deletion, insertion, substitution and transposition.

Value

integer vector with pairwise edit distances

References

Damerau F (1964). A technique for computer detection and correction of spelling errors. Communications of the ACM, 7,issue 3

Levenshtein VI (1966). Binary codes capable of correcting deletions, insertions, and reversals. Soviet Physics Doklady 10: 707-10 Damerau Levenshtein Distance calculates the difference between two strings used for typographical errors (typo's)


deducorrect documentation built on May 2, 2019, 3:47 p.m.