Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
levenshtein-edit-distance
Advanced tools
Readme
Levenshtein edit distance (by Vladimir Levenshtein). No cruft. Real fast.
Install:
npm install levenshtein-edit-distance
Use:
var levenshtein = require('levenshtein-edit-distance');
levenshtein('levenshtein', 'levenshtein'); //=> 0
levenshtein('sitting', 'kitten'); //=> 3
levenshtein('gumbo', 'gambol'); //=> 2
levenshtein('saturday', 'sunday'); //=> 3
/* Case sensitive! */
levenshtein('DwAyNE', 'DUANE') !== levenshtein('dwayne', 'DuAnE'); //=> true
/* Insensitive: */
levenshtein('DwAyNE', 'DUANE', true) === levenshtein('dwayne', 'DuAnE', true); //=> true
/* Order insensitive */
levenshtein('aarrgh', 'aargh') === levenshtein('aargh', 'aarrgh'); //=> true
Install:
npm install -g levenshtein-edit-distance
Use:
Usage: levenshtein-edit-distance [options] word word
Levenshtein edit distance. No cruft. Real fast.
Options:
-h, --help output usage information
-v, --version output version number
-i, --insensitive ignore casing
Usage:
# output distance
$ levenshtein-edit-distance sitting kitten
# 3
# output distance from stdin
$ echo "saturday,sunday" | levenshtein-edit-distance
# 3
levenshtein.c
— C APIlevenshtein
— C CLIlevenshtein-rs
— Rust APIlancaster-stemmer
— Lancaster stemming algorithmdouble-metaphone
— Double Metaphone implementationsoundex-code
— Fast Soundex implementationdice-coefficient
— Sørensen–Dice coefficientsyllable
— Syllable count in an English wordFAQs
Levenshtein edit distance
We found that levenshtein-edit-distance demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).