From a897287fbc34772d549cfa0d2aa31e23533edbe5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 19 Apr 2016 15:08:44 +0100 Subject: [PATCH] [Feature] Set the default limit for classifier We now disallow statistics to be used unless at least 200 learns has been performed for the specified classifier --- conf/statistic.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/conf/statistic.conf b/conf/statistic.conf index 3315fe4b4..697f1ccef 100644 --- a/conf/statistic.conf +++ b/conf/statistic.conf @@ -19,8 +19,7 @@ # - and - # http://rspamd.com/rspamd_statistics/bayes.ham.sqlite -classifier { - type = "bayes"; +classifier "bayes" { tokenizer { name = "osb"; } @@ -30,6 +29,8 @@ classifier { min_tokens = 11; backend = "sqlite3"; languages_enabled = true; + min_learns = 200; + statfile { symbol = "BAYES_HAM"; path = "${DBDIR}/bayes.ham.sqlite"; @@ -40,6 +41,7 @@ classifier { path = "${DBDIR}/bayes.spam.sqlite"; spam = true; } - .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/statistic.conf" - .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/statistic.conf" } + +.include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/statistic.conf" +.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/statistic.conf" -- 2.39.5