diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-14 10:02:54 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-14 10:02:54 +0400 |
commit | 00e5f24b527fab74d6447733025ef5a18a814018 (patch) | |
tree | 02dab75ca73e0a99003946b273e4bc67edb783c0 /src/expressions.c | |
parent | b0ddff4f0d56a877305649a14b902b3f23140b4b (diff) | |
download | rspamd-00e5f24b527fab74d6447733025ef5a18a814018.tar.gz rspamd-00e5f24b527fab74d6447733025ef5a18a814018.zip |
Change logic of params inside compare parts distance.
During learning and classifying compare parts using new algorithm.
Raise similarity factor.
Diffstat (limited to 'src/expressions.c')
-rw-r--r-- | src/expressions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expressions.c b/src/expressions.c index 3dfd542a4..b231bb309 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -1093,8 +1093,8 @@ rspamd_parts_distance (struct worker_task * task, GList * args, void *unused) debug_task ("got likeliness between parts of %d%%, threshold is %d%%", diff, threshold); *pdiff = diff; memory_pool_set_variable (task->task_pool, "parts_distance", pdiff, NULL); - if (threshold2 > 0 && threshold > threshold2) { - if (diff <= threshold && diff >= threshold2) { + if (threshold2 > 0 && threshold < threshold2) { + if (diff >= threshold && diff <= threshold2) { return TRUE; } } |