Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A natural language classifier using Node Natural with a BrainJS neural network
| Date | Stars |
|---|---|
| 2026-07-31 | 318 |
| 2026-08-03 | 318 |
| 2026-08-04 | 318 |
| 2026-08-06 | 318 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# natural-brain
[](https://greenkeeper.io/)
[](https://travis-ci.org/mysamai/natural-brain)
A natural language classifier for [Node Natural](https://github.com/NaturalNode/natural) using the [harthur-org/brain.js](https://github.com/harthur-org/brain.js) fork of [BrainJS](https://github.com/harthur/brain), a JavaScript neural network:
Note: This classifier passes the same tests as the [Node Natural Bayes classifier](https://github.com/NaturalNode/natural/blob/a79254585f2e381378f788de5168f6a906e037e8/spec/bayes_classifier_spec.js).
> npm install natural-brain
```js
var BrainJSClassifier = require('natural-brain');
var classifier = new BrainJSClassifier();
classifier.addDocument('my unit-tests failed.', 'software');
classifier.addDocument('tried the program, but it was buggy.', 'software');
classifier.addDocument('tomorrow we will do standup.', 'meeting');
classifier.addDocument('the drive has a 2TB capacity.', 'hardware');
classifier.addDocument('i need a new power supply.', 'hardware');
classifier.addDocument('can you play some new music?', 'music');
classifier.train();
console.log(classifier.classify('did the tests pass?')); // -> software
console.log(classifier.classify('did you buy a new drive?')); // -> hardware
console.log(classifier.classify('What is the capacity?')); // -> hardware
console.log(classifier.classify('Lets meet tomorrow?')); // -> meeting
console.log(classifier.classify('Can you play some stuff?')); // -> music
```
## Restoring and saving
The trained classifier can be saved to a JSON file like this:
```js
classifier.save('test/brain_classifier.json', function () {});
```
And restored from the file like this:
```js
BrainJSClassifier.load('test/brain_classifier.json', null, null,
function (err, newClassifier) {
if (err) {
return done(err);
}
}
)
```
## License
Copyright (c) 2018
Licensed under the [MIT license](LICENSE).
Excerpt of 2,063 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:902d44a70b93f90e, llm:Description: 'A natural language classifier using Node Natural with a BrainJS neural network' (repository description).
matched fp:902d44a70b93f90e, llm:Description: 'A natural language classifier using Node Natural with a BrainJS neural network' (repository description).