44 #include "ngram_model_internal.h" 45 #include "lm_trie_quant.h" 81 size_t ngram_mem_size;
88 float backoff[NGRAM_MAX_ORDER];
89 uint32 prev_hist[NGRAM_MAX_ORDER - 1];
95 lm_trie_t *lm_trie_create(uint32 unigram_count,
96 lm_trie_quant_type_t quant_type,
int order);
98 lm_trie_t *lm_trie_read_bin(uint32 * counts,
int order, FILE * fp);
100 void lm_trie_write_bin(
lm_trie_t * trie, uint32 unigram_count, FILE * fp);
104 void lm_trie_alloc_ngram(
lm_trie_t * trie, uint32 * counts,
int order);
107 uint32 * counts,
int order);
111 float lm_trie_score(
lm_trie_t * trie,
int order, int32 wid, int32 * hist,
112 int32 n_hist, int32 * n_used);
Structure that specifies bits required to efficiently store certain data.
An implementation bit array - memory efficient storage for digit int and float data.
file IO related operations.