]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Apply tanh to scores
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 29 Jul 2017 14:23:30 +0000 (15:23 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 29 Jul 2017 14:23:30 +0000 (15:23 +0100)
src/lua/lua_task.c

index ec9f34d05e422f4b8b8006cb426abd3036427bd2..78d78c9541dcdedcc26b652acf363399cc4044f9 100644 (file)
@@ -3115,7 +3115,7 @@ tokens_foreach_cb (gint id, const gchar *sym, gint flags, gpointer ud)
        mres = cbd->task->result;
 
        if (mres && (s = g_hash_table_lookup (mres->symbols, sym)) != NULL) {
-               lua_pushnumber (cbd->L, s->score);
+               lua_pushnumber (cbd->L, tanh (s->score));
        }
        else {
                lua_pushnumber (cbd->L, 0.0);