[Spambayes] spamcounts.py

Skip Montanaro skip at pobox.com
Wed Nov 19 22:14:35 EST 2003


I checked in a modified version of my spamcounts.py script to the contrib
directory of the SpamBayes CVS repository.  I pulled out the zero display,
added a -t flag to get it to tokenize a message on standard input and added
a spam prob column to the output.  Output now looks like this:

    % spamcounts -t < spam1
    db: /Users/skip/.hammiedb
    token,nspam,nham,spam prob
    content-type:text/html,132,52,0.646438294335
    subject:ADV,3,0,0.934782608696
    subject::  ,2,0,0.908163265306
    subject: ,178,135,0.487504978915
    "subject:, ",15,12,0.474589627851
    to:no real name:2**0,153,124,0.470976272284
    cc:none,188,134,0.503003515571
    sender:none,185,101,0.569109950886
    reply-to:no real name:2**0,39,34,0.453087648376
    to:2**0,192,138,0.500916379669
    x-mailer:none,106,85,0.473640904
    ...

Skip



More information about the Spambayes mailing list