diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-15 15:02:48 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-15 15:02:48 +0000 |
commit | ee40b9d1146420d00f1ccf356716dc2c5b87e318 (patch) | |
tree | b010daa13cb8f27a846d782294c1f672e4b42612 /src/libstat/classifiers | |
parent | f4d3c21d16cd1c71f7a4bb7772e77e768a7ab8d1 (diff) | |
download | rspamd-ee40b9d1146420d00f1ccf356716dc2c5b87e318.tar.gz rspamd-ee40b9d1146420d00f1ccf356716dc2c5b87e318.zip |
[Feature] Skip stop words in statistics
Diffstat (limited to 'src/libstat/classifiers')
-rw-r--r-- | src/libstat/classifiers/bayes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstat/classifiers/bayes.c b/src/libstat/classifiers/bayes.c index 2e494e526..1898df4fe 100644 --- a/src/libstat/classifiers/bayes.c +++ b/src/libstat/classifiers/bayes.c @@ -175,7 +175,7 @@ bayes_classify_token (struct rspamd_classifier *ctx, } /* Probability for this token */ - if (total_count > ctx->cfg->min_token_hits) { + if (total_count >= ctx->cfg->min_token_hits) { spam_freq = ((double)spam_count / MAX (1., (double) ctx->spam_learns)); ham_freq = ((double)ham_count / MAX (1., (double)ctx->ham_learns)); spam_prob = spam_freq / (spam_freq + ham_freq); |