diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-12 20:46:55 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-12 20:46:55 +0400 |
commit | ff4871310ff5b269dcd02ea300cf78092860e1d4 (patch) | |
tree | cfa435f5de1dc8efc646a0ca1fc6fd261b2c1aa6 /src/filter.h | |
parent | c4105fc43199d51af271bc24d3345aa57906d973 (diff) | |
download | rspamd-ff4871310ff5b269dcd02ea300cf78092860e1d4.tar.gz rspamd-ff4871310ff5b269dcd02ea300cf78092860e1d4.zip |
* First commit to implement multi-statfile filter system with new learning mechanizm (untested yet)
Diffstat (limited to 'src/filter.h')
-rw-r--r-- | src/filter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/filter.h b/src/filter.h index cfcab7cb5..930594170 100644 --- a/src/filter.h +++ b/src/filter.h @@ -11,6 +11,7 @@ struct worker_task; struct rspamd_settings; +struct classifier_config; typedef double (*metric_cons_func)(struct worker_task *task, const gchar *metric_name, const gchar *func_name); typedef void (*filter_func)(struct worker_task *task); @@ -136,6 +137,15 @@ double factor_consolidation_func (struct worker_task *task, const gchar *metric_ */ gboolean learn_task (const gchar *statfile, struct worker_task *task, GError **err); +/* + * Learn specified statfile with message in a task + * @param statfile symbol of statfile + * @param task worker's task object + * @param err pointer to GError + * @return true if learn succeed + */ +gboolean learn_task_spam (struct classifier_config *cl, struct worker_task *task, gboolean is_spam, GError **err); + gboolean check_action_str (const gchar *data, gint *result); const gchar *str_action_metric (enum rspamd_metric_action action); gint check_metric_action (double score, double required_score, struct metric *metric); |