summaryrefslogtreecommitdiffstats
path: root/lualib/rescore_utility.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-30 14:07:59 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-30 14:07:59 +0100
commit7c15db236e7511e957c540968b0e205c2b1d2b95 (patch)
treef8bab349a5e9e38519e8c83100e4d729e3604819 /lualib/rescore_utility.lua
parentd927a3a73c751adc21694262f0c931b8a6a55372 (diff)
downloadrspamd-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.lua12
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)