]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove metatokens count checks
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 6 Apr 2017 12:13:57 +0000 (13:13 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 6 Apr 2017 12:13:57 +0000 (13:13 +0100)
src/libstat/classifiers/bayes.c

index 7441153ff43a187c7d66c25177aa7a33b42b9ffa..e26cd7a02fd5dab1b7476e542a7070cd196d48b4 100644 (file)
@@ -336,15 +336,6 @@ bayes_classify (struct rspamd_classifier * ctx,
        *pprob = final_prob;
        rspamd_mempool_set_variable (task->task_pool, "bayes_prob", pprob, NULL);
 
-       if (cl.text_tokens <= (cl.processed_tokens - cl.text_tokens) / 2) {
-               msg_info_bayes ("ignore bayes probability %.2f since we have "
-                               "much more metatokens (%d) than text tokens (%d)",
-                               final_prob,
-                               cl.processed_tokens - cl.text_tokens, cl.text_tokens);
-
-               return TRUE;
-       }
-
        if (ctx->cfg->min_tokens > 0 &&
                        cl.text_tokens < ctx->cfg->min_tokens * 0.1) {
                msg_info_bayes ("ignore bayes probability %.2f since we have "