A suggestion on bogofilter option -s and -n

Wang Jian lark at linux.net.cn
Thu Jul 1 21:21:04 CEST 2004


Hi David Relson,

I have make a new patch which is for 0.92.0. I also tested the various
cases and it seems to work fine.

What changed from last patch:

1. a logic problem in the code;
2. support -Sn or -Ns combination;
3. the long option name is now --train-on-error;

But I don't like the idea that use -g with -S or -N, it is confusing at
all in the first place.

+    if (train_on_error_mode) {
+        spamicity = msg_compute_spamicity(w, NULL);
+        status = msg_status();
+        if (run_type & REG_GOOD && status == RC_HAM) {
+            run_type = run_type & (~ REG_GOOD);
+            run_type = run_type & (~ UNREG_SPAM);
+        } else if (run_type & REG_SPAM && status == RC_SPAM) {
+            run_type = run_type & (~ REG_SPAM);
+            run_type = run_type & (~ UNREG_GOOD);
+        }
+    }



And, FYI, I did dig through code and make sure '-g' is not used, and
did check OPTIONS includes 'g', it is not my luck :)


On Thu, 1 Jul 2004 13:25:10 -0400, David Relson <relson at osagesoftware.com> wrote:

> On Fri, 02 Jul 2004 00:48:47 +0800
> Wang Jian wrote:
> 
> > Hi,
> > 
> > No one seems to have interest in this suggestion, so I make a patch
> > against 0.91.4 first for review. Because I am having a headache now, I
> > hack this patch in a hurry and haven't tested it thoroughly, it looks
> > fine. It's just a proof-of-concept.
> > 
> > Relson, if you this is a good idea, I will make a patch for the latest
> > version of bogofilter later.
> 
> Hi lark,
> 
> The code looks like it should work.  Let me know if it does what you
> need.
> 
> You got lucky in having 'g' included in OPTIONS in bogoconfig.c.  It
> used to select the graham algorithm, and should have been deleted when
> the graham algorithm went away.
> 
> I was thinking of naming it "--train-on-error" and having the option
> toggle a mode flag.
> 
> Creation of patches, as you have done, is much preferable to requesting
> features.  Thank you.
> 
> Regards,
> 
> David
> 
> P.S. I know the chinese custom is to use family name in addressing
> people, but (being american) I prefer to be addressed as "David".
> _______________________________________________
> Bogofilter mailing list
> Bogofilter at bogofilter.org
> http://www.bogofilter.org/mailman/listinfo/bogofilter



-- 
  lark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bogofilter_0_92_0_train_on_error.patch
Type: application/octet-stream
Size: 3106 bytes
Desc: not available
URL: <http://www.bogofilter.org/pipermail/bogofilter/attachments/20040702/441444f7/attachment.obj>


More information about the Bogofilter mailing list