Skip to content

Questions about wink-distance #31

Discussion options

You must be logged in to vote

Hello @paul-bell

Yes, wink-distance has APIs to determine similarity between texts. Cosine distance is one of the prominent way to determine similarity; other being jaccard and tversky. The cosine distance accepts bow, whereas jaccard and tversky accept set as the input parameters. Note, since it computes "distance", you will have to subtract from 1 to obtain the similarity!

You could use wink-nlp to create the bag-of-words (bow). Here is the code to do it:

// Require packages & models.
const distance = require( 'wink-distance' );
const winkNLP = require( 'wink-nlp' );
const its = require( 'wink-nlp/src/its.js' );
const as = require( 'wink-nlp/src/as.js' );
const model = require( 'wink-en…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@sanjayaksaxena
Comment options

Answer selected by sanjayaksaxena
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sanjayaksaxena
Comment options

Comment options

You must be logged in to vote
1 reply
@sanjayaksaxena
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #30 on June 13, 2021 04:27.