diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-25 17:34:08 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-25 17:34:08 +0000 |
commit | e180ef2ce601b4118dab29ab074712c0a58244e4 (patch) | |
tree | b3da007cff3ce5964f86e868301fc9cb897ffb70 /src/libstat/classifiers/bayes.c | |
parent | 63ef123b048d5f1f2f6a5d172be6dc1a2629e2d7 (diff) | |
download | rspamd-e180ef2ce601b4118dab29ab074712c0a58244e4.tar.gz rspamd-e180ef2ce601b4118dab29ab074712c0a58244e4.zip |
[Project] Finish basic tasks in new unicode project
Diffstat (limited to 'src/libstat/classifiers/bayes.c')
-rw-r--r-- | src/libstat/classifiers/bayes.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libstat/classifiers/bayes.c b/src/libstat/classifiers/bayes.c index 934c8d941..2b0cf21e8 100644 --- a/src/libstat/classifiers/bayes.c +++ b/src/libstat/classifiers/bayes.c @@ -147,8 +147,8 @@ bayes_classify_token (struct rspamd_classifier *ctx, msg_debug_bayes ( "token(meta) %uL <%*s:%*s> probabilistically skipped", tok->data, - (int) tok->t1->len, tok->t1->begin, - (int) tok->t2->len, tok->t2->begin); + (int) tok->t1->original.len, tok->t1->original.begin, + (int) tok->t2->original.len, tok->t2->original.begin); } return; @@ -199,8 +199,9 @@ bayes_classify_token (struct rspamd_classifier *ctx, msg_debug_bayes ( "token %uL <%*s:%*s> skipped, prob not in range: %f", tok->data, - (int) tok->t1->len, tok->t1->begin, - (int) tok->t2->len, tok->t2->begin, bayes_spam_prob); + (int) tok->t1->stemmed.len, tok->t1->stemmed.begin, + (int) tok->t2->stemmed.len, tok->t2->stemmed.begin, + bayes_spam_prob); return; } @@ -227,8 +228,8 @@ bayes_classify_token (struct rspamd_classifier *ctx, "current spam prob: %.3f, current ham prob: %.3f", token_type, tok->data, - (int) tok->t1->len, tok->t1->begin, - (int) tok->t2->len, tok->t2->begin, + (int) tok->t1->stemmed.len, tok->t1->stemmed.begin, + (int) tok->t2->stemmed.len, tok->t2->stemmed.begin, fw, w, total_count, spam_count, ham_count, spam_prob, ham_prob, bayes_spam_prob, bayes_ham_prob, @@ -541,8 +542,8 @@ bayes_learn_spam (struct rspamd_classifier * ctx, msg_debug_bayes ("token %uL <%*s:%*s>: window: %d, total_count: %d, " "spam_count: %d, ham_count: %d", tok->data, - (int) tok->t1->len, tok->t1->begin, - (int) tok->t2->len, tok->t2->begin, + (int) tok->t1->stemmed.len, tok->t1->stemmed.begin, + (int) tok->t2->stemmed.len, tok->t2->stemmed.begin, tok->window_idx, total_cnt, spam_cnt, ham_cnt); } else { |