Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 920 Bytes

File metadata and controls

17 lines (10 loc) · 920 Bytes

Levenshtein Text Similarity Demo

In 1965 Vladmir Levenshtein created a distance algorithm. With Levenshtein distance, we measure similarity and match approximate strings with fuzzy logic.

Compute Levenshtein distance (or edit distance) between two strings is the number of deletions, insertions, or substitutions required to transform source string into target string.

For example, if source is "book" and target is "back", to transform "book" to "back" you will need to change first "o" to "a", second "o" to "c", without additional deletions and insertions, thus, Levenshtein distance will be 2. More about Levenshtein Algorithm you can read here.

This sample compare two text files similarity.

Play with it!

Licence

Licenced under MIT. Contact me on LinkedIn.