b643af57808698fd715003618f3e0e79c74c18fe
[citadel.git] / citadel / modules / fulltext / ft_wordbreaker.h
1 /*
2  * $Id$
3  *
4  */
5
6
7 /*
8  * This is an ID for the wordbreaker module.  If we do pluggable wordbreakers
9  * later on, or even if we update this one, we can use a different ID so the
10  * system knows it needs to throw away the existing index and rebuild it.
11  */
12 #define FT_WORDBREAKER_ID       0x0021
13
14 /*
15  * Minimum and maximum length of words to index
16  */
17 #define WB_MIN                  4       // nothing with 3 or less chars
18 #define WB_MAX                  40
19
20 void wordbreaker(char *text, int *num_tokens, int **tokens);
21
22 void initialize_noise_words(void);
23 void noise_word_cleanup(void);
24
25
26 typedef struct noise_word noise_word;
27
28 struct noise_word {
29         unsigned int len;
30         char *word;
31         noise_word *next;
32 };