aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-29 15:23:30 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-29 15:23:30 +0100
commitc2f9222a2438fa9d604bf92e63010a4ae5041f63 (patch)
tree3b3e43578fc1cce1931b3dfb17b676fd91b6b823
parent5f4c417a192316416fa14fd68cac82a190cbf28a (diff)
downloadrspamd-c2f9222a2438fa9d604bf92e63010a4ae5041f63.tar.gz
rspamd-c2f9222a2438fa9d604bf92e63010a4ae5041f63.zip
[Minor] Apply tanh to scores
-rw-r--r--src/lua/lua_task.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index ec9f34d05..78d78c954 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -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);