Giter VIP home page Giter VIP logo

wink-bm25-text-search's People

Contributors

prtksxna avatar sanjayaksaxena avatar wholebuzz avatar wholenews avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wink-bm25-text-search's Issues

fuzzy matches

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?

Change License to "AGPL-3.0-only" or "AGPL-3.0-or-later"

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.

How to run this application?

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

Consider instantiating bm25fIMS when setting module.exports

Like express (HTTP server), and unlike other wink libraries, bm25 needs to be instantiated before using.

Express

var express = require('express');
var app = express();

NBC

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.

Trying to use this in a TypeScript project: Cannot call a namespace ("winkBM25")

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?

Please clarify your position on the AGPL license

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?

addDoc for duplicate documents

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.