diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-30 14:07:59 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-30 14:07:59 +0100 |
commit | 7c15db236e7511e957c540968b0e205c2b1d2b95 (patch) | |
tree | f8bab349a5e9e38519e8c83100e4d729e3604819 /lualib/rescore_utility.lua | |
parent | d927a3a73c751adc21694262f0c931b8a6a55372 (diff) | |
download | rspamd-7c15db236e7511e957c540968b0e205c2b1d2b95.tar.gz rspamd-7c15db236e7511e957c540968b0e205c2b1d2b95.zip |
[Project] Further reworks of rescore tool
Diffstat (limited to 'lualib/rescore_utility.lua')
-rw-r--r-- | lualib/rescore_utility.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lualib/rescore_utility.lua b/lualib/rescore_utility.lua index 268e814d8..39ad63365 100644 --- a/lualib/rescore_utility.lua +++ b/lualib/rescore_utility.lua @@ -78,13 +78,13 @@ function utility.get_all_logs(dirs) end function utility.get_all_symbol_scores(conf, ignore_symbols) - local counters = conf:get_symbols_counters() + local symbols = conf:get_symbols_scores() - return fun.tomap(fun.map(function(elt) - return elt['symbol'],elt['weight'] - end, fun.filter(function(elt) - return not ignore_symbols[elt['symbol']] - end, counters))) + return fun.tomap(fun.map(function(name, elt) + return name,elt['score'] + end, fun.filter(function(name, elt) + return not ignore_symbols[name] + end, symbols))) end function utility.generate_statistics_from_logs(logs, threshold) |