From: Vsevolod Stakhov Date: Mon, 21 Jan 2019 14:32:44 +0000 (+0000) Subject: [Rework] Change logic of fuzzy probabilities scoring X-Git-Tag: 1.9.0~283 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=910986a6961bb6cb68212c786ae10d8db6f15c00;p=rspamd.git [Rework] Change logic of fuzzy probabilities scoring --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index bfb6b4d72..6b0843948 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;