dannybtran / hubot-twss

That's what she said script for hubot.
6 stars 1 forks source link

what version of natural does this require? #1

Open alexnauda opened 9 years ago

alexnauda commented 9 years ago

hubot wow, that's huge Hubot> [Thu Nov 13 2014 18:43:47 GMT-0500 (EST)] ERROR TypeError: Cannot call method 'getClassifications' of undefined at check (/Users/alex/w/tiktok/scripts/twss.coffee:28:13, :20:26) at /Users/alex/w/tiktok/scripts/twss.coffee:36:7, :30:13 at /Users/alex/w/tiktok/node_modules/natural/lib/natural/classifiers/bayes_classifier.js:49:13 at /Users/alex/w/tiktok/node_modules/natural/lib/natural/classifiers/classifier.js:152:13 at fs.js:207:20 at Object.oncomplete (fs.js:107:15)

alexnauda commented 9 years ago

Nevermind, this was a mismatching path in your twss.coffee... It's looking for ./src/scripts/twss/classifier-twss.json and I do not have a src directory. (The scripts dir is at the root of the project.)

AHaymond commented 9 years ago

Thanks for the tip @alexnauda

workmaster2n commented 9 years ago

in case anyone comes across this, changed line 26 to: natural.BayesClassifier.load './scripts/twss/classifier-twss.json', null, (err, classifier) ->

in particular, it's the './scripts/twss/classifier-twss.json' that is important