[cvs] bogofilter bogoutil.c,1.59,1.60
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <re...@us...> - 2003-01-29 04:08:38
|
Update of /cvsroot/bogofilter/bogofilter In directory sc8-pr-cvs1:/tmp/cvs-serv22233 Modified Files: bogoutil.c Log Message: Display proper counts for ROBX calculation. Index: bogoutil.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/bogoutil.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- bogoutil.c 29 Jan 2003 03:15:17 -0000 1.59 +++ bogoutil.c 29 Jan 2003 04:08:35 -0000 1.60 @@ -412,6 +412,7 @@ static double compute_robx(void *dbh_spam, void *dbh_good) { + uint32_t robx_cnt = 0; uint32_t word_cnt = 0; double sum = 0.0; double robx; @@ -424,7 +425,7 @@ rh.scalefactor = (double)msg_spam/msg_good; rh.dbh_good = dbh_good; rh.sum = ∑ - rh.count = &word_cnt; + rh.count = &robx_cnt; db_foreach(dbh_good, count_hook, &word_cnt); db_foreach(dbh_spam, robx_hook, &rh); |