### 5.2.16 Levensthein distance

The levenshtein command computes the Levenshtein distance between two words, which is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one word into the other.

- levenshtein takes two arguments:
  - s1, a vector or string.
  - s2, a vector or string.
- levenshtein(s1,s2) returns the minimum number n of edits required to transform s1 into s2.

#### Example

levenshtein("kitten","sitting")

3 |  |  |  |  |  |  |  |  |  |