Open alexnauda opened 10 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.)
Thanks for the tip @alexnauda
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
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)