#include <ngram.h>
Static Public Member Functions | |
| static void | init (void) |
| Performs class start-up initialization. | |
| static NGram * | get (const raw_ngram_t &raw_ngram, ngram_type_t ngram_type) |
| static NGram * | get (const NGram *source, ngram_type_t ngram_type) |
Static Private Attributes | |
| static void * | _ngram_space = 0 |
| Space to keep NGrams instances. | |
Note: This class is not thread-safe!
| void ace::NGramToken::init | ( | void | ) | [static] |
Performs class start-up initialization.
Must be called earlier than any of get() methods.
| NGram * ace::NGramToken::get | ( | const raw_ngram_t & | raw_ngram, | |
| ngram_type_t | ngram_type | |||
| ) | [static] |
| raw_ngram | Source raw N-gram. | |
| ngram_type | Type of N-gram to be created (determines which members of `raw_ngram` are copied). |
| NGram * ace::NGramToken::get | ( | const NGram * | source, | |
| ngram_type_t | ngram_type | |||
| ) | [static] |
| source | Pointer to source N-gram (full type) which should be downcasted. | |
| ngram_type | Type of N-gram to be created (determines which members of `source` are copied). |
void * ace::NGramToken::_ngram_space = 0 [static, private] |
Space to keep NGrams instances.
For efficiency purposes declared as static.
1.5.6