commit 910986a: [Rework] Change logic of fuzzy probabilities scoring
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Jan 21 14:42:04 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-01-21 14:32:44 +0000
URL: https://github.com/rspamd/rspamd/commit/910986a6961bb6cb68212c786ae10d8db6f15c00 (HEAD -> master)
[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 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;
More information about the Commits
mailing list