Re: bogofilter on opensolaris with sqlite
David Relson <[email protected]>
| Newsgroups | gmane.mail.bogofilter.general |
|---|---|
| Organization | Osage Software Systems, Inc. |
| Message-ID | <[email protected]> |
timejumper:
Indeed function compute_robinson_x in file src/robx.c has a divide by
zero problem (for a new ham-free wordlist such as yours). The fix is
below and has been committed to subversion.
Thanks for reporting the problem.
Regards,
David
Index: src/robx.c
===================================================================
--- src/robx.c (revision 6867)
+++ src/robx.c (working copy)
@@ -83,8 +83,8 @@
dsh = wordlist->dsh;
- rh.spam_cnt = wordlist->msgcount[IX_SPAM];
- rh.good_cnt = wordlist->msgcount[IX_GOOD];
+ rh.spam_cnt = max(wordlist->msgcount[IX_SPAM],1);
+ rh.good_cnt = max(wordlist->msgcount[IX_GOOD],1);
rh.scalefactor = (double)rh.spam_cnt/(double)rh.good_cnt;
rh.dsh = dsh;
_______________________________________________
Bogofilter mailing list
[email protected]
http://www.bogofilter.org/mailman/listinfo/bogofilter