refactoring of main bogofilter function
Eric Seppanen
eds at reric.net
Sat Sep 14 19:46:01 CEST 2002
On Sat, Sep 14, 2002 at 01:08:11PM -0400, David Relson wrote:
>
> I've noticed that the main bogofilter() function is getting rather
> long. Looking at it, I see that it's doing several tasks:
>
> 1 - parsing the input message to generate a word list
> 2 - computing the spamicity from the word list
> 3 - displaying the word list (in verbose mode)
> 4 - returning a spam/good status
>
> It seems to me that the big function can be broken into several smaller
> functions. Given that each function can then be looked at separately _and_
> understood, I think this would be a good thing to do.
My multi-list patch breaks out #2 into a separate function, that divides
the code pretty neatly in half.
More information about the bogofilter-dev
mailing list