#include <ngram_model_internal.h>
Data Fields | |
| int | refcount |
| Reference count. | |
| int32 * | n_counts |
| Counts for 1, 2, 3, . | |
| int32 | n_1g_alloc |
| Number of allocated word strings (for new word addition). | |
| int32 | n_words |
| Number of actual word strings (NOT the same as the number of unigrams, due to class words). | |
| uint8 | n |
| This is an n-gram model (1, 2, 3, . | |
| uint8 | n_classes |
| Number of classes (maximum 128). | |
| uint8 | writable |
| Are word strings writable? | |
| uint8 | flags |
| Any other flags we might care about (FIXME: Merge this and writable). | |
| logmath_t * | lmath |
| Log-math object. | |
| float32 | lw |
| Language model scaling factor. | |
| int32 | log_wip |
| Log of word insertion penalty. | |
| int32 | log_uw |
| Log of unigram weight. | |
| int32 | log_uniform |
| Log of uniform (0-gram) probability. | |
| int32 | log_uniform_weight |
| Log of uniform weight (i.e. | |
| int32 | log_zero |
| Zero probability, cached here for quick lookup. | |
| char ** | word_str |
| Unigram names. | |
| hash_table_t * | wid |
| Mapping of unigram names to word IDs. | |
| int32 * | tmp_wids |
| Temporary array of word IDs for ngram_model_get_ngram(). | |
| ngram_class_s ** | classes |
| Word class definitions. | |
| ngram_funcs_s * | funcs |
| Implementation-specific methods. | |
The details of bigram, trigram, and higher-order N-gram storage, if any, can vary somewhat depending on the file format in use.
Definition at line 55 of file ngram_model_internal.h.
Log of uniform weight (i.e.
1 - unigram weight)
Definition at line 71 of file ngram_model_internal.h.
This is an n-gram model (1, 2, 3, .
..).
Definition at line 61 of file ngram_model_internal.h.
Referenced by ngram_iter_successors(), ngram_model_get_size(), ngram_model_mgrams(), ngram_model_set_add(), ngram_model_set_remove(), and ngram_ng_iter().
Counts for 1, 2, 3, .
.. grams
Definition at line 57 of file ngram_model_internal.h.
Referenced by ngram_model_get_counts().
1.4.7