From c60730b8a46d95bd7a9ad95cf03d256772cbb700 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 10 May 2017 11:49:14 +0100 Subject: [PATCH] [Minor] Reduce digit->number transmission penalty Issue: #1630 --- src/plugins/chartable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/chartable.c b/src/plugins/chartable.c index 1c50f5194..b0c05fa82 100644 --- a/src/plugins/chartable.c +++ b/src/plugins/chartable.c @@ -209,7 +209,7 @@ rspamd_chartable_process_word_utf (struct rspamd_task *task, /* Penalize digit -> alpha translations */ if (!is_url && sc != UBLOCK_BASIC_LATIN && prev_state != start_process) { - badness += 1.0; + badness += 0.25; } } else if (state == got_alpha) { @@ -305,7 +305,7 @@ rspamd_chartable_process_word_ascii (struct rspamd_task *task, if (state == got_digit) { /* Penalize digit -> alpha translations */ if (seen_alpha && !is_url && !g_ascii_isxdigit (*p)) { - badness += 1.0; + badness += 0.25; } } else if (state == got_alpha) { -- 2.39.5