[phrases] exposing trie_add_at_index and trie_get_from_index for more control in the transliteration tries

This commit is contained in:
Al
2015-04-26 22:24:02 -04:00
parent 6ebea11640
commit 8bc77372ef
2 changed files with 43 additions and 36 deletions

View File

@@ -91,10 +91,13 @@ void trie_set_tail(trie_t *self, unsigned char *tail, int32_t tail_pos);
int32_t trie_separate_tail(trie_t *self, uint32_t from_index, unsigned char *tail, uint32_t data);
void trie_tail_merge(trie_t *self, uint32_t old_node_id, unsigned char *suffix, uint32_t data);
void trie_add_at_index(trie_t *self, uint32_t node_id, char *key, uint32_t data);
void trie_add(trie_t *self, char *key, uint32_t data);
void trie_add_suffix(trie_t *self, char *key, uint32_t data);
uint32_t trie_get(trie_t *self, char *word, bool whole_word);
uint32_t trie_get_from_index(trie_t *self, char *word, size_t len, uint32_t i);
uint32_t trie_get_len(trie_t *self, char *word, size_t len);
uint32_t trie_get(trie_t *self, char *word);
void trie_print(trie_t *self);