From 910986a6961bb6cb68212c786ae10d8db6f15c00 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 21 Jan 2019 14:32:44 +0000 Subject: [PATCH] [Rework] Change logic of fuzzy probabilities scoring --- src/plugins/fuzzy_check.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index bfb6b4d72f..6b0843948c 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1903,6 +1903,9 @@ fuzzy_insert_result (struct fuzzy_client_session *session, res->type = FUZZY_RESULT_IMG; } else { + /* Calc real probability */ + nval *= sqrtf (rep->v1.prob); + if (cmd->shingles_count > 0) { type = "txt"; res->type = FUZZY_RESULT_TXT; @@ -1910,8 +1913,6 @@ fuzzy_insert_result (struct fuzzy_client_session *session, else { res->type = FUZZY_RESULT_BIN; } - - nval *= rspamd_normalize_probability (rep->v1.prob, 0.5); } res->score = nval; -- 2.47.3