@extra-string/tversky-distance

    1.1.3 • Public • Published

    Get Tversky distance between strings.

    const tverskyDistance = require('@extra-string/tversky-distance');
    // tverskyDistance(<string-1>, <string-2>, [α=1], [β=1], [ngram=2])
     
    tverskyDistance('pocket', 'pocket');
    // 0
    tverskyDistance('monster', 'rocket');
    // 1
    tverskyDistance('pikachu', 'raichu', 0.2, 0.4, 3);
    // 0.6666666666666667

    extra-string

    Install

    npm i @extra-string/tversky-distance

    DownloadsWeekly Downloads

    1

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    3 kB

    Total Files

    5

    Last publish

    Collaborators

    • wolfram77