New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

lshjs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lshjs

Module which allows query strings to be placed into LSH batches, and compares candidates from a list of LSH candidates

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

lshjs

Module which allows query strings to be placed into LSH batches, and compares candidates from a list of LSH candidates.

Installing

Using npm:

$ npm install lshjs

Using yarn:

$ yarn add lshjs

Methods

getLshBatchesFromQueryString(queryString: string, minhashSize: number, bandSize: number): string[]

Given a parameter of queryString, minhashSize and bandSize, returns the respective LSH batch as a list of strings.

queryString Label/document to be placed into LSH batches.

minhashSize Number of permutations to be done when minhashing the shingles.

bandSize Number of rows in a band when placing minhashed values into a LSH batch.

sortByNearestCandidate(candidateLists: string[][], queryString: string): {candidate: string, consonantDistance: number}[]

Given a parameter of candidateLists and queryString, returns the candidates in the order of their levenshtein distance from the query string.

candidateLists List of candidates acquired from accessing individual LSH batches.

queryString Label/document to be compared with the candidates

FAQs

Package last updated on 19 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts