forked from GitHub/dbot
classify
This commit is contained in:
parent
f3e31925af
commit
e608491360
@ -40,6 +40,12 @@ var drama = function(dbot) {
|
||||
var msg = params.join(' ');
|
||||
bayes.train(msg, category);
|
||||
dbot.say(data.channel, '\'' + msg + '\' classified as \'' + category + '\'');
|
||||
},
|
||||
|
||||
'~classify': function() {
|
||||
bayes.classify(data.message, function(category) {
|
||||
dbot.say(data.channel, 'Classified as: ' + category + '!');
|
||||
}.bind(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user