aboutsummaryrefslogtreecommitdiffstats
path: root/src/classifiers
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-10-17 21:04:29 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-10-17 21:04:29 +0300
commitbb783aa50c87907a2012d6979b47e10c9189892e (patch)
tree1f02a3072cc00f23047b07dc6728aa7d6e02c10b /src/classifiers
parentdf46d970cdea50a41ae54d9125d61458c59486d7 (diff)
downloadrspamd-bb783aa50c87907a2012d6979b47e10c9189892e.tar.gz
rspamd-bb783aa50c87907a2012d6979b47e10c9189892e.zip
* Add configuration utils for kvstorage
Diffstat (limited to 'src/classifiers')
-rw-r--r--src/classifiers/bayes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/classifiers/bayes.c b/src/classifiers/bayes.c
index bf7e4d9d4..265957bc9 100644
--- a/src/classifiers/bayes.c
+++ b/src/classifiers/bayes.c
@@ -221,7 +221,7 @@ bayes_classify (struct classifier_ctx* ctx, statfile_pool_t *pool, GTree *input,
data.learned_tokens = 0;
if (ctx->cfg->opts && (value = g_hash_table_lookup (ctx->cfg->opts, "max_tokens")) != NULL) {
- minnodes = parse_limit (value);
+ minnodes = parse_limit (value, -1);
data.max_tokens = minnodes;
}
else {
@@ -320,7 +320,7 @@ bayes_learn (struct classifier_ctx* ctx, statfile_pool_t *pool, const char *symb
data.learned_tokens = 0;
data.learned_tokens = 0;
if (ctx->cfg->opts && (value = g_hash_table_lookup (ctx->cfg->opts, "max_tokens")) != NULL) {
- minnodes = parse_limit (value);
+ minnodes = parse_limit (value, -1);
data.max_tokens = minnodes;
}
else {
@@ -425,7 +425,7 @@ bayes_learn_spam (struct classifier_ctx* ctx, statfile_pool_t *pool,
data.learned_tokens = 0;
if (ctx->cfg->opts && (value = g_hash_table_lookup (ctx->cfg->opts, "max_tokens")) != NULL) {
- minnodes = parse_limit (value);
+ minnodes = parse_limit (value, -1);
data.max_tokens = minnodes;
}
else {