0.1.1 • Published 2 years ago

ad-classifier v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Naive classifier bayesian with sqlite

Usage

npm i ad-classifier
const Classifer = require("ad-classifier");
const instans = new Classifer("profile_1")

To create an instance of a class, you can choose a profile name and point from constructor or just leave it blank. Then it will be used default profile.

For teach a classify, you can used to methods: .learn() or .learnOne()

instans.learn([
    { token: "Dog", word: "Barks and bites" },
    { token: "Cat", word: "Purring and sleeping" },
    ]);

instans.learnOne("Dog", "Barks and bites");

For take result a classifying, you can used method: .classify()

instans.classify("Just eating and sleeping") // "Cat"

For remove profile, you can used method: .dropProfile()

instans.dropProfile("profile_1")

For removed a wrong data in classify, you can used methods: .unLearn() or .unLearnOne()

instans.unLearn([{ token: "Cat", word: "Purring and sleeping" }])
instans.unLearnOne("Cat", "Purring and sleeping")

For remove token and all data with it, you can used method: .remove()

instans.remove("Cat")
0.1.1

2 years ago

0.1.0

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago