ABOUT:
A levenshtein distance implementation to find the similarity score between two sentences. The score is the number of deletions, insertions or substitutions required to transform.
INSTALL:
$ npm install levenshtein-js
USAGE:
const logger = ; const levenshtein = ; let sentence1 = 'levenshtein';let sentence2 = 'levenstei'; let difference = ; // difference will be 2logger;`
WORKING:
In the above example, the character 'h' will be deleted and the character 'n' will be inserted. Here 1 insertion and 1 deletion so the difference is 2.