diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libstat/classifiers/bayes.c | 4 | ||||
-rw-r--r-- | src/libstat/stat_process.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/libstat/classifiers/bayes.c b/src/libstat/classifiers/bayes.c index 979329d4e..be6c6f545 100644 --- a/src/libstat/classifiers/bayes.c +++ b/src/libstat/classifiers/bayes.c @@ -103,6 +103,8 @@ bayes_classify_callback (gpointer key, gpointer value, gpointer data) ham_count += res->value; } total_count += res->value; + res->st_runtime->total_hits += res->value; + res->cl_runtime->processed_tokens ++; } } @@ -160,6 +162,8 @@ bayes_classify (struct classifier_ctx * ctx, s = 1 - inv_chi_square (-2. * rt->ham_prob, 2 * rt->processed_tokens); final_prob = (s + 1 - h) / 2.; + msg_debug ("<%s> got ham prob %.2f -> %.2f and spam prob %.2f -> %.2f", + task->message_id, rt->ham_prob, h, rt->spam_prob, s); } if (rt->processed_tokens > 0 && fabs (final_prob - 0.5) > 0.05) { diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index b0e8ffdb9..022edde7d 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -109,7 +109,6 @@ preprocess_init_stat_token (gpointer k, gpointer v, gpointer d) if (st_runtime->backend->process_token (t, res, st_runtime->backend->ctx)) { - cl_runtime->processed_tokens ++; if (cl_runtime->clcf->max_tokens > 0 && cl_runtime->processed_tokens > cl_runtime->clcf->max_tokens) { |