Levenshtein Distance And A Real-World-Use In-Finding Similar-Words

Posted at

Here is the JavaScript code, embedded from GitHub,
it provides a working implementation of the algorithm,
and an example on how to use it to find similar words to an input word,
from a given list of potentially similar words, a.k.a approximate string matching, a.k.a Fuzzy logic & fuzzy matching.

The use of String.prototype make it visualy-easier (passing less-arguments).

https://gist.github.com/eladkarako/bdad5c2b7c414b390f84d8b56035c17f.js



Some more to read:
https://rosettacode.org/wiki/Levenshtein_distance
https://github.com/yomguithereal/talisman
https://gist.github.com/andrei-m/982927
https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript
https://stackoverflow.com/questions/55804367/how-to-efficiently-find-similar-strings-in-a-unique-string-in-javascript