Skip to content

tversky index

Subhajit Sahu edited this page May 5, 2020 · 1 revision

Get Tversky index between strings.

const tverskyIndex = require('@extra-string/tversky-index');
// tverskyIndex(<string-1>, <string-2>, [α=1], [β=1], [ngram=2])

tverskyIndex('pocket', 'pocket');
// 1
tverskyIndex('monster', 'rocket');
// 0
tverskyIndex('pikachu', 'raichu', 0.2, 0.4, 3);
// 0.3333333333333333

extra-string

Clone this wiki locally