mysamai / natural-brain Goto Github PK
View Code? Open in Web Editor NEWA natural language classifier using Node Natural with a BrainJS neural network
License: MIT License
A natural language classifier using Node Natural with a BrainJS neural network
License: MIT License
Hey,
We were using this classifier in our system and since BrainJS is no longer maintained, we ended up writing up the exact same thing using the synaptic package.
If you want to check it out, here it is.
How would this work with huge amount of data (e.g. thousands/millions of pairs), without freezing?
Nice project, btw!
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();
////////SERVER METHOD
'sendToServer':function(message){
var classification = classifier.classify(message);
console.log(classification); //=> print classificaiton
return classification; //=> return undefined
}
both natural and brain allow for serialization (in the case of brain), or actual saving of a trained classifer (natural).
Is there a similar functionality here?
1.4.5
to 1.4.6
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
brain.js is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
Adds toFunction()
to RNNTimeStep and a number of fixes to do with hidden layers in recurrent nets.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hi,
I clone the repo and did npm install, but then I do npm start I got this:
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'compile' ] 2 info using [email protected] 3 info using [email protected] 4 verbose stack Error: missing script: compile 4 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:155:19) 4 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:63:5 4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:115:5 4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:418:5 4 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:373:45) 4 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:416:3) 4 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:160:5) 4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:364:12 4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16 4 verbose stack at tryToString (fs.js:514:3) 5 verbose cwd /Users/atodorov/Desktop/Work/natural-brain 6 verbose Darwin 16.7.0 7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "compile" 8 verbose node v8.5.0 9 verbose npm v6.4.1 10 error missing script: compile 11 verbose exit [ 1, true ]
1.4.0
to 1.4.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
brain.js is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 5 commits.
f0a1a56
Merge pull request #280 from BrainJS/mubaidr-patch-1
133f40a
fix: build
dd1ae57
fix: Remove reference to options
or this.options
to testPartition
812f014
Merge branch 'v1.x' into mubaidr-patch-1
79096ba
Fix options is undefined!
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hey Man
I am bit confused with the brainjs implementation. If I had to use brain.recurrent.RNN
, how can that call be passed whilst adding documents?
If my understanding is correct, this classifier is using node natural only for stemming, stop-words removal right? This is not using the Naive Bayes classifier from the natural
library.
Branch | Build failing π¨ |
---|---|
Dependency | debug |
Current Version | 3.1.0 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
debug is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
A long-awaited release to debug
is available now: 3.2.0
.
chrome.storage
(or make the storage backend pluggable): 71d2aa7supports-color@5
: 285dfe1enable()
(#517): ab5083fHuge thanks to @DanielRuf, @EirikBirkeland, @KyleStay, @Qix-, @abenhamdine, @alexey-pelykh, @DiegoRBaquero, @febbraro, @kwolfy, and @TooTallNate for their help!
The new version differs by 25 commits.
dec4b15
3.2.0
3ca2331
clean up builds
9f4f8f5
remove needless command aliases in makefile
623c08e
no longer checking for BROWSER=1
57cde56
fix tests
62822f1
clean up makefile
833b6f8
fix tests
ba8a424
move to XO (closes #397)
2d2509e
add .editorconfig
853853f
bump vulnerable packages
7e1d5d9
add yarn-error.log to .gitignore
e43e5fe
add instance extends feature (#524)
207a6a2
Fix nwjs support (#569)
05b0ceb
add Node.js 10, remove Node.js 4 (#583)
02b9ea9
Add TVMLKit support (#579)
There are 25 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Worked fine once I rolled back to an older version (8.15)
Here's the error:
glgpcadmins-MBP:nps-comments asaeed$ node app.js
/Users/person/project/node_modules/natural/lib/natural/classifiers/classifier.js:32
if (e.code !== 'MODULE_NOT_FOUND') throw e;
^
Error: dlopen(/Users/person/project/node_modules/webworker-threads/build/Release/WebWorkerThreads.node, 1): Symbol not found: __ZN2v811ArrayBuffer9Allocator13SetProtectionEPvmNS1_10ProtectionE
Referenced from: /Users/person/project/node_modules/webworker-threads/build/Release/WebWorkerThreads.node
Expected in: flat namespace
in /Users/person/project/node_modules/webworker-threads/build/Release/WebWorkerThreads.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at bindings (/Users/person/project/node_modules/bindings/bindings.js:84:48)
at Object. (/Users/person/project/node_modules/webworker-threads/index.js:1:105)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
Hi there,
I'm in love with your natural brain lib.
I think I found a little but critical bug in your code.
I try restore my trained output,
(node:2088) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'brain' of undefined
1.5.2
to 1.6.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
brain.js is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 11 commits.
8d6dd01
Merge pull request #311 from BrainJS/rnn-time-step-cross-validate
52d137e
fix: Add more unit tests and fixes for consistency for CrossValidate
7489388
Merge branch 'master' into rnn-time-step-cross-validate
3b66cbc
Merge branch '310-fix-gpu-to-json' into rnn-time-step-cross-validate
ef269fc
fix: docs
7700326
fix: Bump and build
d5ff75d
feat: Refactorings for getting TrainStream working with RNNTimeStep
3f97bb8
fix: bump version and build
3cdf6c4
fix: Add remaining data type handling to .test()
with tests
c7113b5
fix: Shelling out more of .test()
w/ tests
a2d2d89
feat: Auto inputSize/outputSize & RNNTimeStep w/ CrossValidate
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
0.6.1
to 0.6.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
natural is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 17 commits ahead by 17, behind by 4.
a60a257
0.6.2
0657e4e
Repair porter stemmer nl (#468)
9ca3691
Repaired WordPunctTokenizer and added unit test (#466)
fe87171
Do not split Swedish text on hyphen (#464)
5e708be
Updated the README to reflect that the Egghead course is no longer free.
6bb2bc5
Moved data/kata-dasar.txt to lib/natural/stemmers/indonesian/data and converted it to JSON.
dbb7001
Repaired type swollow -> swallow in the spec folder
1ccdb9c
Update README.md (#457)
73acfeb
chore: clone last 5 commits (#453)
636370c
chore: cache node_modules (#447)
9180e9b
Revert "chore: update lockfile (#452)" (#454)
d78434a
chore: update lockfile (#452)
52a4d34
chore: migrate makefile to npm scripts (#450)
5e1aae2
chore: remove ignored .vscode directory (#449)
b837871
chore: add Node.js 8 and 10 (#448)
There are 17 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
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.