lshjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i lshjs

Weekly Downloads

8

Version

1.0.8

License

MIT

Unpacked Size

290 kB

Total Files

28

Last publish

Collaborators

  • sjeon