Skip to content

A simple module for text search based on cosine similarity of NGrams

Notifications You must be signed in to change notification settings

fuzzy-coder/javascript-text-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

javascript-text-search

A simple javascript library searches term against list of strings using Cosine Similarity

To enable partial matches, the dataset and the search term are tokenized using NGram

usage

const TextSearch = require('text-search')
index = new TextSearch({
        fuzzyMatch: true,
        nGramLowerLimit: 3,
        nGramUpperLimit: 4,
        dataSet: ['George', 'John', 'Thomas', 'James', 'Andrew']
      })
console.log(index.search('Tho'))

About

A simple module for text search based on cosine similarity of NGrams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published