From: Vsevolod Stakhov Date: Wed, 10 May 2017 10:49:14 +0000 (+0100) Subject: [Minor] Reduce digit->number transmission penalty X-Git-Tag: 1.5.8~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c60730b8a46d95bd7a9ad95cf03d256772cbb700;p=rspamd.git [Minor] Reduce digit->number transmission penalty Issue: #1630 --- 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) {