Comparing version 0.0.61 to 0.0.62
@@ -26,10 +26,11 @@ /* | ||
classifier.train([ | ||
{classification: 'software', text: "my unit-tests failed."}, | ||
{classification: 'software', text: "tried the program, but it was buggy."}, | ||
{classification: 'hardware', text: "the drive has a 2TB capacity."}, | ||
{classification: 'hardware', text: "i need a new power supply."} | ||
]); | ||
classifier.addDocument('my unit-tests failed.', 'software'); | ||
classifier.addDocument('tried the program, but it was buggy.', 'software'); | ||
classifier.addDocument('the drive has a 2TB capacity.', 'hardware'); | ||
classifier.addDocument('i need a new power supply.', 'hardware'); | ||
classifier.train(); | ||
console.log(classifier.classify('did the tests pass?')); | ||
console.log(classifier.classify('did you buy a new drive?')); |
@@ -26,4 +26,4 @@ /* | ||
natural.BayesClassifier.load('classifier.json', function(err, classifier) { | ||
natural.BayesClassifier.load('classifier.json', null, function(err, classifier) { | ||
console.log(classifier.classify('did the tests pass?')); | ||
}); |
@@ -26,9 +26,10 @@ /* | ||
classifier.train([ | ||
{classification: 'software', text: ['unit', 'test']}, | ||
{classification: 'software', text: ['bug', 'program']}, | ||
{classification: 'hardware', text: ['drive', 'capacity']}, | ||
{classification: 'hardware', text: ['power', 'supply']} | ||
]); | ||
classifier.addDocument('my unit-tests failed.', 'software'); | ||
classifier.addDocument('tried the program, but it was buggy.', 'software'); | ||
classifier.addDocument('the drive has a 2TB capacity.', 'hardware'); | ||
classifier.addDocument('i need a new power supply.', 'hardware'); | ||
classifier.train(); | ||
classifier.save('classifier.json', function(err, classifier) { | ||
@@ -35,0 +36,0 @@ // the classifier is saved to the classifier.json file! |
{ | ||
"name": "natural", | ||
"description": "General natural language (tokenizing, stemming, classification, inflection, phonetics, tfidf, WordNet) facilities for node.", | ||
"version": "0.0.61", | ||
"version": "0.0.62", | ||
"homepage": "https://github.com/NaturalNode/natural", | ||
"engines": { | ||
@@ -9,3 +10,3 @@ "node": ">=0.2.6" | ||
"dependencies": { | ||
"sylvester": ">= 0.0.8", | ||
"sylvester": ">= 0.0.12", | ||
"apparatus": ">= 0.0.4", | ||
@@ -12,0 +13,0 @@ "underscore": "*" |
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
243231
80
4739
1
Updatedsylvester@>= 0.0.12