string-dameraulevenshteindistance

    0.1.3 • Public • Published

    string-dameraulevenshteindistance

    NPM

    Get Damerau-Levenshtein distance between strings.

    const damerauLevenshteinDistance = require('string-dameraulevenshteindistance');
    // damerauLevenshteinDistance(<string-1>, <string-2>, [insertion cost=1], [deletion cost=1], [substitution cost=1], [transposition cost=1])
     
    damerauLevenshteinDistance('gnu', 'gun');
    // 1
    damerauLevenshteinDistance('software', 'softwear');
    // 2
    damerauLevenshteinDistance('level field', 'lvele feidl', 1, 1, 1, 0.1);
    // 0.4

    NOTE: string-dameraulevenshteindistance was renamed to @extra-string/damerau-levenshtein-distance.

    Install

    npm i string-dameraulevenshteindistance

    DownloadsWeekly Downloads

    0

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    2.74 kB

    Total Files

    3

    Last publish

    Collaborators

    • wolfram77