You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by David Birnbaum <da...@chelsea.net> on 2004/02/25 22:16:41 UTC
Assymetry in learning spam and ham
Oops...wrong list.
----
Howdy,
Just a question. For learning a message as spam (and reporting it), it
seems like this is adequate:
$f->report_as_spam( $mail )
However, for ham, it seems like you need to do this:
$f->init_learner;
$status = $f->learn( $mail );
$f->rebuild_learner_caches;
$f->finish_learner
report_as_spam() implies that it is learnt by Bayes, but I didn't see if
the learn() stuff is happening under the hood. It also appears the
learn() returns a status object, where report returns nothing terribly
useful.
Is the code in 2.63 doing the right thing? This is for a persistant
process, so I need to make sure I get it right.
Thanks,
David.
Re: Assymetry in learning spam and ham
Posted by Michael Parker <pa...@pobox.com>.
On Wed, Feb 25, 2004 at 04:16:41PM -0500, David Birnbaum wrote:
> Just a question. For learning a message as spam (and reporting it), it
> seems like this is adequate:
>
> $f->report_as_spam( $mail )
>
> However, for ham, it seems like you need to do this:
>
> $f->init_learner;
> $status = $f->learn( $mail );
> $f->rebuild_learner_caches;
> $f->finish_learner
>
> report_as_spam() implies that it is learnt by Bayes, but I didn't see if
> the learn() stuff is happening under the hood. It also appears the
> learn() returns a status object, where report returns nothing terribly
> useful.
>
Well, you could in theory call $f->revoke_as_spam($mail) which will
learn the message as ham and then call Razor revoke. Not sure how
good it is to be calling revoke on all ham however.
Michael