Giter Club home page Giter Club logo

Comments (10)

khadeshyam avatar khadeshyam commented on July 28, 2024 1

Yeah it's Bayesian classifier module

from natural.

Hugo-ter-Doest avatar Hugo-ter-Doest commented on July 28, 2024 1

Support for a number of storage methods has been added. See #727

from natural.

khadeshyam avatar khadeshyam commented on July 28, 2024

how did you load the model can u provide some code snippets

from natural.

Hugo-ter-Doest avatar Hugo-ter-Doest commented on July 28, 2024

Of course, we can build everything we want :-)

I am curious to know which module you are working with? Is it the Bayesian classifier?

I think this would be a configuration to choose between database and JSON. In the end a back-end to save to and load from different types of storage methods. But starting with a choice between JSON and database would be great.

from natural.

Hugo-ter-Doest avatar Hugo-ter-Doest commented on July 28, 2024

Some design ideas:

  • Pass a config object to Classifier in classifier.js. Also put the stemmer in there to prevent many arguments when creating the object.
  • Adapt the load and and save methods to work with mongodb depending on the configuration: return a key on save, and load using a key. Instead of filenames.

from natural.

khadeshyam avatar khadeshyam commented on July 28, 2024

can anyone provide code snippets of Bayesian classifier module that's compatible with the latest package version

from natural.

Hugo-ter-Doest avatar Hugo-ter-Doest commented on July 28, 2024

You could take a look at the tests:
https://github.com/NaturalNode/natural/blob/master/spec/bayes_classifier_spec.js

from natural.

fernandovargascabrera avatar fernandovargascabrera commented on July 28, 2024

This will be amazing! The classifier could receive an object that implements an interface, allowing us to access the data and handle it effectively. This enables the user implementing 'natural' to choose their preferred database. Instead of loading all the data at once, we could simply read from the database.

from natural.

Hugo-ter-Doest avatar Hugo-ter-Doest commented on July 28, 2024

Yes, you could store a trained classifier in a database. Later on you could retrieve and re-instate it as an object using `SetPrototypeOf``.

Wrt design I am considering a backend that supports file-based storage and MongoDB to begin with by means of plugins or something like that. In this way we can abstract away the concrete storage method.

from natural.

Hugo-ter-Doest avatar Hugo-ter-Doest commented on July 28, 2024

See #727

from natural.

Related Issues (20)

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.