Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 439 Bytes

NormalizedLevenshtein.md

File metadata and controls

21 lines (14 loc) · 439 Bytes

Normalized Levenshtein

This distance is computed as levenshtein distance divided by the length of the longest string. The resulting value is always in the interval 0 to 1.

Example

val levenshtein = NormalizedLevenshtein()
println(levenshtein.similarity("kitten", "kirten"))

Output:

0.8333333333333334

Links

Levenshtein Distance