Mail::Classifier::GrahamSpam is a spam classification tool based on Paul Graham's algorithm.
SYNOPSIS
use Mail::Classifier::GrahamSpam;
$bb = Mail::Classifier::GrahamSpam->new();
$bb->bias( 'NOTSPAM', 2);
$bb->train( { 'spam.mbox' => 'SPAM', 'notspam.mbox' => 'NOTSPAM' } );
my ($cat, $prob) = $bb->score( $msg );
ABSTRACT
Mail::Classifier::GrahamSpam - spam classification based on Paul Graham's algorithm
This class is a specific implementation of a Mail::Classifier that uses Naive Bayesian methods for associating messages with a category. The specific implemenation is based on the article "A Plan for Spam" by Paul Graham (thus the name).
For classic Graham, make sure to set bias on non-spam to 2.
While this class was designed to classify spam and non-spam, there is no underlying limitation that only two categories be used and thus it may be used for more general purposes as well. (And should perhaps be renamed in a subsequent release.) For example, we might call
$bb->train ({ 'perl.mbox' => 'PERL',
'java.mbox' => 'JAVA',
'php.mbox' => 'PHP' });
in order to train the classifier to identify other categories of mail.
Requirements:
· Perl
Product's homepage