[cvs] bogofilter/src bogotune.c,1.137,1.138
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <re...@us...> - 2004-05-09 14:48:50
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27495 Modified Files: bogotune.c Log Message: Remove '-F' (force) option. Index: bogotune.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/bogotune.c,v retrieving revision 1.137 retrieving revision 1.138 diff -u -d -r1.137 -r1.138 --- bogotune.c 9 May 2004 14:40:38 -0000 1.137 +++ bogotune.c 9 May 2004 14:48:40 -0000 1.138 @@ -129,7 +129,6 @@ static char *ds_path; static bool bogolex = false; /* true if convert input to msg-count format */ -static bool force = false; /* force adherence to minimum message counts */ static bool esf_flag = true; /* test ESF factors if true */ static char *bogolex_file = NULL; static word_t *w_msg_count; @@ -825,7 +824,6 @@ "\t -D - don't read a wordlist file.\n" "\t -d path - specify directory for wordlists.\n" "\t -E - disable ESF (effective size factor) tuning.\n" - "\t -F - force tuning with fewer than %d messages.\n" "\t -M - output input file in message count format.\n" "\t -r num - specify robx value\n", LIST_COUNT); @@ -871,9 +869,6 @@ case 'E': esf_flag ^= true; break; - case 'F': - force ^= true; - break; case 'I': argc -= 1; bogolex_file = *++argv; @@ -919,15 +914,6 @@ filelist_add( (run_type == REG_GOOD) ? ham_files : spam_files, arg); } - if (force && !quiet) { - fprintf(stderr, "*** WARNING *** The authors of bogotune strongly advise\n"); - fprintf(stderr, "against the use of the -F option. The option bypasses\n"); - fprintf(stderr, "bogotune's protective checks and allows bogotune to run\n"); - fprintf(stderr, "without enough messages to ensure valid results. This will\n"); - fprintf(stderr, "often result in bogotune suggesting wrong parameter values\n"); - fprintf(stderr, "that, if used, may significantly degrade bogofilter's accuracy.\n"); - } - if (!bogolex && (spam_files->count == 0 || ham_files->count == 0)) { fprintf(stderr, @@ -1312,7 +1298,7 @@ { bool ok = true; - if (!force && (msgs_good < LIST_COUNT || msgs_bad < LIST_COUNT)) { + if (msgs_good < LIST_COUNT || msgs_bad < LIST_COUNT)) { QPRINTF(stderr, "The wordlist contains %d non-spam and %d spam messages.\n" "Bogotune must be run with at least %d of each.\n", @@ -1334,11 +1320,10 @@ "The messages sets contain %u non-spam and %u spam. Bogotune " "requires at least %d non-spam and %d spam messages to run.\n", ns_cnt, sp_cnt, TEST_COUNT, TEST_COUNT); - if (!force) - exit(EX_ERROR); + exit(EX_ERROR); } - return !force ? ok : true; + return ok; } static rc_t bogotune(void) |