diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-05-27 17:33:31 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-05-27 17:33:31 +0400 |
commit | ac8249b6ee746f022b0753789e6e2b46ab842abc (patch) | |
tree | 0aa5fd13aa5df6a9f72b46295abff33670d211da /src/tokenizers | |
parent | 41503710ed4ae1d52d98cb2f0686a19fc814f25c (diff) | |
download | rspamd-ac8249b6ee746f022b0753789e6e2b46ab842abc.tar.gz rspamd-ac8249b6ee746f022b0753789e6e2b46ab842abc.zip |
* Implement new learning system, now rspamd should be much more intelligent while learning messages
Diffstat (limited to 'src/tokenizers')
-rw-r--r-- | src/tokenizers/osb.c | 2 | ||||
-rw-r--r-- | src/tokenizers/tokenizers.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/tokenizers/osb.c b/src/tokenizers/osb.c index d36047efd..ae59cf8ea 100644 --- a/src/tokenizers/osb.c +++ b/src/tokenizers/osb.c @@ -66,7 +66,7 @@ osb_tokenize_text (struct tokenizer *tokenizer, memory_pool_t * pool, f_str_t * for (i = 1; i < FEATURE_WINDOW_SIZE; i++) { h1 = hashpipe[0] * primes[0] + hashpipe[i] * primes[i << 1]; h2 = hashpipe[0] * primes[1] + hashpipe[i] * primes[(i << 1) - 1]; - new = memory_pool_alloc (pool, sizeof (token_node_t)); + new = memory_pool_alloc0 (pool, sizeof (token_node_t)); new->h1 = h1; new->h2 = h2; diff --git a/src/tokenizers/tokenizers.h b/src/tokenizers/tokenizers.h index fda5bded3..9a16e907c 100644 --- a/src/tokenizers/tokenizers.h +++ b/src/tokenizers/tokenizers.h @@ -18,6 +18,7 @@ typedef struct token_node_s { uint32_t h1; uint32_t h2; float value; + uintptr_t extra; } token_node_t; /* Common tokenizer structure */ |