simple-spam-filter
v0.0.2
Published
Simple spam filter to analyze tweets.
Downloads
7
Readme
simple-spam-filter
Simple spam filter to analyze tweets.
Installation
$ npm install simple-spam-filter
Usage
var SimpleSpamFilter = require('simple-spam-filter')
// These parameters are all optional
var opts = {
minWords: 5,
maxPercentCaps: 30,
maxNumSwearWords: 2
}
var filter = new SimpleSpamFilter(opts)
var spammyTweet = 'YO MAN WATUPPPPP SONN'
filter.isSpam(spammyTweet) // true
var nonSpammyTweet = 'Why hello good sir, how are you doing?'
filter.isSpam(nonSpammyTweet) // false
License
MIT