-}
-
-
-static struct word_trie *build_word_trie(NMEM nmem, const char **terms)
-{
- struct word_trie *res = create_word_trie_node(nmem);
- const char **p;
- int i;
-
- for (i = 1, p = terms; *p; p++, i++)
- word_trie_addterm(nmem, res, *p, i);
- return res;
-}
-
-#else
-
-struct word_entry {
- const char *norm_str;
- int termno;
- struct word_entry *next;
-};
-
-static void add_word_entry(NMEM nmem,
- struct word_entry **entries,
- const char *norm_str,
- int term_no)
-{
- struct word_entry *ne = nmem_malloc(nmem, sizeof(*ne));
- ne->norm_str = nmem_strdup(nmem, norm_str);
- ne->termno = term_no;
-
- ne->next = *entries;
- *entries = ne;
-}
-
-
-int word_entry_match(struct word_entry *entries, const char *norm_str)
-{
- for (; entries; entries = entries->next)