aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/classifiers/classifiers.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-26 14:07:19 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-26 14:07:19 +0000
commit76f009e1daceebe4116d731e22b4ebe1836e5ca6 (patch)
treea93dc9a449cc2fdc8d1371491f2987b289cc5ba7 /src/libstat/classifiers/classifiers.h
parent1503e994ecace47a1cfc48a681744ac57a439a4a (diff)
downloadrspamd-76f009e1daceebe4116d731e22b4ebe1836e5ca6.tar.gz
rspamd-76f009e1daceebe4116d731e22b4ebe1836e5ca6.zip
Update bayes.
Diffstat (limited to 'src/libstat/classifiers/classifiers.h')
-rw-r--r--src/libstat/classifiers/classifiers.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libstat/classifiers/classifiers.h b/src/libstat/classifiers/classifiers.h
index e2bf57f81..9a30039df 100644
--- a/src/libstat/classifiers/classifiers.h
+++ b/src/libstat/classifiers/classifiers.h
@@ -18,14 +18,19 @@ struct classifier_ctx {
struct rspamd_classifier_config *cfg;
};
+struct token_node_s;
+struct rspamd_classifier_runtime;
+
struct rspamd_stat_classifier {
char *name;
struct classifier_ctx * (*init_func)(rspamd_mempool_t *pool,
struct rspamd_classifier_config *cf);
gboolean (*classify_func)(struct classifier_ctx * ctx,
- GTree *input, struct rspamd_task *task);
+ GTree *input, struct rspamd_classifier_runtime *rt,
+ struct rspamd_task *task);
gboolean (*learn_spam_func)(struct classifier_ctx * ctx,
- GTree *input, struct rspamd_task *task, gboolean is_spam,
+ GTree *input, struct rspamd_classifier_runtime *rt,
+ struct rspamd_task *task, gboolean is_spam,
GError **err);
};
@@ -34,9 +39,11 @@ struct classifier_ctx * bayes_init (rspamd_mempool_t *pool,
struct rspamd_classifier_config *cf);
gboolean bayes_classify (struct classifier_ctx * ctx,
GTree *input,
+ struct rspamd_classifier_runtime *rt,
struct rspamd_task *task);
gboolean bayes_learn_spam (struct classifier_ctx * ctx,
GTree *input,
+ struct rspamd_classifier_runtime *rt,
struct rspamd_task *task,
gboolean is_spam,
GError **err);