[cvs] bogofilter/src bogofilter.c,1.43,1.44 score.c,1.31,1.32
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <re...@us...> - 2004-11-20 19:35:22
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7918 Modified Files: bogofilter.c score.c Log Message: In every bogofilter run, call score_init(), score_cleanup(), rstats_init(), and rstats_cleanup(). Index: bogofilter.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/bogofilter.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- bogofilter.c 20 Nov 2004 03:34:52 -0000 1.43 +++ bogofilter.c 20 Nov 2004 19:35:03 -0000 1.44 @@ -81,8 +81,6 @@ // atexit(bf_exit); - score_initialize(); /* initialize constants */ - if (query) query_config(); @@ -93,6 +91,7 @@ wordhash_t *w = wordhash_new(); passthrough_setup(); + score_initialize(); /* initialize constants */ collect_words(w); msgcount += 1; Index: score.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/score.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- score.c 20 Nov 2004 03:34:52 -0000 1.31 +++ score.c 20 Nov 2004 19:35:03 -0000 1.32 @@ -181,9 +181,6 @@ Rtable |= verbose > 3; need_stats = Rtable || verbose || passthrough; - if (need_stats) - rstats_init(); - if (DEBUG_ALGORITHM(2)) fprintf(dbgout, "min_dev: %f, robs: %f, robx: %f\n", min_dev, robs, robx); @@ -263,6 +260,8 @@ wordlist_t *list = get_default_wordlist(word_lists); + rstats_init(); + if (fabs(min_dev) < EPS) min_dev = MIN_DEV; if (spam_cutoff < EPS) |