1.1.0 • Published 10 years ago

clickbait v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

Click Bait

Determine if a string is click bait or not.

Why

With all the annoying buzzfeed garbage that is showing up on the internet I figure it'd be nice to have a way to weed that out. I don't know if this package has any real use case, but it actually kind of works, which is the amazing part. The classification is coming from the natural package that uses a Naive Bayes classifier to do the magic. This package just really trains the classifier and then returns to you if something is spammy looking.

Installation

$ npm install clickbait

Usage

var clickbait = require('clickbait');

// wait for it to train itself
clickbait.on('ready', function(){

  clickbait.bait('12 amazing photos of cute dogs');
  // => "spam"

  clickbait.bait('Obama to deploy troops to middle east');
  // => "not"

});

Tests

Tests run with mocha

$ npm test