winkjs / wink-bm25-text-search Goto Github PK
View Code? Open in Web Editor NEWFast Full Text Search based on BM25
License: MIT License
Fast Full Text Search based on BM25
License: MIT License
I have wink-bm25-text-search and wink-nlp-utils setup and working. if i have a search partially spelled out, like "lega" it wont match "legal". on my vue app, it runs search with each input so i would like it to match sooner. i found wink-distance but i dont think i can just plug it into engine.definePrepTasks
is there an easy way to get "fuzzy" searches?
The "AGPL-3.0" license currently used in this module (as well as in other Wink modules) is marked as deprecated by SPDX. The current valid identifiers are "AGPL-3.0-only" and "AGPL-3.0-or-later". According to SPDX,
Release 3.0 replaced previous Identifiers for GNU licenses with more explicit Identifiers to reflect the “this version only” or “any later version” option specific to those licenses. As such, the previously used Identifiers for those licenses are deprecated as of v3.0.
Using the deprecated "AGPL-3.0" license identifier causes this module to be flagged as a vulnerability in tools like Snyk.
Hi,
I tried to run this application but just noticed only command in readme.
also, i have collection of text document. is text document is supported or any tool to convert text to json files
where to place the json or text files and load it? just placing the files in a folder would be sufficient
Thanks
Like express (HTTP server), and unlike other wink libraries, bm25 needs to be instantiated before using.
var express = require('express');
var app = express();
var bm25 = require( 'wink-bm25-text-search' )();
In our source code, could we:
module.exports = bm25fIMS();
The function doesn't have any arguments so there aren't two ways of doing this any way.
Here' how I'm attempting to use this. And here's the interesting thing, it works great when in dev mode (npm run dev). But it fails to build properly (npm run build).
I get the error: Cannot call a namespace ("winkBM25")
import winkNLP from 'wink-nlp'
import winkModel from 'wink-eng-lite-web-model'
import * as winkBM25 from 'wink-bm25-text-search'
export function createEmbeddings(chunks: string[]): void {
engine = winkBM25() // <--------------- This is where the error is occurring.
engine.defineConfig({ fldWeights: { text: 1 } })
engine.definePrepTasks( [ prepTask ] )
const uniqueChunks = [...new Set(chunks)] // make sure unique
uniqueChunks.forEach((text, index) => engine.addDoc({ text }, index))
engine.consolidate() // consolidate the learnings
}
Is there a different way to initialize the engine that is TypeScript friendly?
I was evaluating this library for use in a new (commercial/not-open-source) service, when I noticed the AGPL license, which some consider to be a 'viral' license.
Do you believe that the AGPL requires me to open-source my software if my software uses the wink-bm25-text-search library (without making any modifications to wink-bm25)?
Or by licensing the library under the AGPL, did you intend to allow me to use and distribute the library (as-is) in a commercial and closed-source application?
I have seen that if I try to add a document with an existing id, it throws this error
if ( documents[ id ] !== undefined ) {
throw Error( 'winkBM25S: Duplicate document encountered: ' + JSON.stringify( id ) );
}
I need to handle document updates. I am wondering if it's possible to update the model if I know both the original and updated versions of a document.
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.