@extra-string/jaccard-distance
v1.1.3
Published
Get Jaccard distance between strings.
Downloads
21
Maintainers
Readme
Get Jaccard distance between strings.
const jaccardDistance = require('@extra-string/jaccard-distance');
// jaccardDistance(<string-1>, <string-2>, [ngram=2])
jaccardDistance('pocket', 'pocket');
// 0
jaccardDistance('monster', 'rocket');
// 1
jaccardDistance('pikachu', 'raichu', 3);
// 0.875