spam_detecter
v1.0.2
Published
classify messages in chat
Downloads
30
Readme
spam-detecter
Small package based on Naive Bayes classifier to classify messages as spam or ham.
Install
npm install spam-detecter
Usage
const check = require('spam-detecter');
const ans = check.detect('hello how are you') // invoke detect method
console.log(ans); // ham
const result = check.getResult('hello how are you')
console.log(result); // [ { label: 'ham', value: 0.01866475233309404 },
{ label: 'spam', value: 0.0030509691313711416 } ]
License
ISC