#include <sys/types.h>
#include <sys/mman.h>
#include <math.h>
#include <cstdlib>
#include <string>
#include <set>
#include <limits>
#include "util.h"
#include "ngramcache.h"
#include "dictionary.h"
#include "n_gram.h"
#include "lmContainer.h"
Go to the source code of this file.
Classes | |
class | lmtable |
Defines | |
#define | MAX(a, b) (((a)>(b))?(a):(b)) |
#define | MIN(a, b) (((a)<(b))?(a):(b)) |
#define | LMTMAXLEV 20 |
#define | MAX_LINE 100000 |
#define | LMTCODESIZE (int)3 |
#define | SHORTSIZE (int)2 |
#define | PTRSIZE (int)sizeof(char *) |
#define | INTSIZE (int)4 |
#define | CHARSIZE (int)1 |
#define | PROBSIZE (int)4 |
#define | QPROBSIZE (int)1 |
#define | BOUNDSIZE (int)sizeof(table_entry_pos_t) |
#define | UNIGRAM_RESOLUTION 10000000.0 |
#define | BOUND_EMPTY1 (numeric_limits<table_entry_pos_t>::max() - 2) |
#define | BOUND_EMPTY2 (numeric_limits<table_entry_pos_t>::max() - 1) |
Typedefs | |
typedef char * | node |
typedef unsigned int | table_entry_pos_t |
typedef unsigned long | table_pos_t |
typedef unsigned char | qfloat_t |
Enumerations | |
enum | LMT_TYPE { INTERNAL, QINTERNAL, LEAF, QLEAF } |
enum | LMT_ACTION { LMT_FIND, LMT_ENTER, LMT_INIT, LMT_CONT } |
#define BOUND_EMPTY1 (numeric_limits<table_entry_pos_t>::max() - 2) |
Definition at line 81 of file lmtable.h.
Referenced by lmtable::add(), lmtable::addwithoffset(), lmtable::checkbounds(), lmtable::expand_level_mmap(), lmtable::expand_level_nommap(), and lmtable::get().
#define BOUND_EMPTY2 (numeric_limits<table_entry_pos_t>::max() - 1) |
#define BOUNDSIZE (int)sizeof(table_entry_pos_t) |
#define CHARSIZE (int)1 |
Definition at line 56 of file lmtable.h.
Referenced by ngramtable::loadbin(), ngramtable::savebin(), and tabletype::tabletype().
#define INTSIZE (int)4 |
Definition at line 55 of file lmtable.h.
Referenced by ngramtable::boff(), ngramtable::loadbin(), ngramtable::savebin(), and tabletype::tabletype().
#define LMTCODESIZE (int)3 |
Definition at line 50 of file lmtable.h.
Referenced by lmtable::bound(), lmtable::bow(), lmtable::codecmp(), lmtable::nodesize(), lmtable::prob(), lmtable::search(), and lmtable::word().
#define LMTMAXLEV 20 |
#define MAX | ( | a, | |||
b | ) | (((a)>(b))?(a):(b)) |
Definition at line 43 of file lmtable.h.
Referenced by mdiadaptlm::reset_caches(), lmtable::reset_lmtcaches(), and lmtable::reset_prob_and_state_cache().
#define MAX_LINE 100000 |
Definition at line 47 of file lmtable.h.
Referenced by lmmacro::load(), lmInterpolation::load(), lmclass::load(), main(), mixture::mixture(), and parseline().
#define MIN | ( | a, | |||
b | ) | (((a)<(b))?(a):(b)) |
#define PROBSIZE (int)4 |
Definition at line 58 of file lmtable.h.
Referenced by lmtable::bound(), lmtable::bow(), and lmtable::nodesize().
#define PTRSIZE (int)sizeof(char *) |
Definition at line 54 of file lmtable.h.
Referenced by ngramtable::mtable(), and tabletype::tabletype().
#define QPROBSIZE (int)1 |
Definition at line 59 of file lmtable.h.
Referenced by lmtable::bound(), lmtable::bow(), and lmtable::nodesize().
#define UNIGRAM_RESOLUTION 10000000.0 |
typedef unsigned int table_entry_pos_t |
typedef unsigned long table_pos_t |
enum LMT_ACTION |