#include <cmath>
#include <math.h>
#include "mfstream.h"
#include <fstream>
#include <stdio.h>
#include <iostream>
#include "mempool.h"
#include "htable.h"
#include "dictionary.h"
#include "n_gram.h"
#include "ngramcache.h"
#include "ngramtable.h"
#include "interplm.h"
#include "normcache.h"
#include "mdiadapt.h"
#include "shiftlm.h"
#include "linearlm.h"
#include "mixture.h"
#include "cmd.h"
#include "lmtable.h"
Go to the source code of this file.
Defines | |
#define | YES 1 |
#define | NO 0 |
#define | NGRAM 1 |
#define | SEQUENCE 2 |
#define | ADAPT 3 |
#define | TURN 4 |
#define | TEXT 5 |
#define | END_ENUM { (char*)0, 0 } |
#define | RESET 1 |
#define | SAVE 2 |
#define | LOAD 3 |
#define | INIT 4 |
#define | STOP 5 |
#define | BIN 11 |
#define | ARPA 12 |
#define | ASR 13 |
#define | TXT 14 |
#define | NGT 15 |
Functions | |
int | init (mdiadaptlm **lm, int lmtype, char *trainfile, int size, int prunefreq, double beta, int backoff, int dub, double oovrate, int mcl) |
int | deinit (mdiadaptlm **lm) |
int | main (int argc, char **argv) |
#define ADAPT 3 |
#define ARPA 12 |
#define ASR 13 |
#define BIN 11 |
#define END_ENUM { (char*)0, 0 } |
Definition at line 57 of file stream-tlm.cpp.
#define INIT 4 |
Definition at line 90 of file stream-tlm.cpp.
Referenced by ngramtable::augment(), mdiadaptlm::compute_backoff_per_level(), computePP(), interplm::gencorrcounts(), interplm::gensuccstat(), mixture::get(), sapt::mm2dTable< id_type, id_type, uint32_t, uint32_t >::m1(), sapt::mm2dTable< id_type, id_type, uint32_t, uint32_t >::m2(), main(), mdiadaptlm::netsize(), sapt::mm2dTable< OFFSET, ID, VAL, INIT >::Row::operator[](), mdiadaptlm::saveARPA_per_level(), mdiadaptlm::saveARPA_per_word(), mdiadaptlm::saveASR(), mdiadaptlm::saveBIN_per_level(), mdiadaptlm::saveBIN_per_word(), mdiadaptlm::saveMT(), ngramtable::savetxt(), ngramtable::scan(), ngramtable::show(), interplm::test_ngt(), mshiftbeta::train(), shiftbeta::train(), mixture::train(), sapt::write_mm_2d_table(), interplm::zerofreq(), and mdiadaptlm::zeta().
#define LOAD 3 |
#define NGRAM 1 |
#define NGT 15 |
#define NO 0 |
Definition at line 47 of file stream-tlm.cpp.
#define RESET 1 |
#define SAVE 2 |
#define SEQUENCE 2 |
#define STOP 5 |
#define TEXT 5 |
Definition at line 54 of file stream-tlm.cpp.
Referenced by util::GuessPhysicalMemory(), and main().
#define TURN 4 |
#define TXT 14 |
#define YES 1 |
Definition at line 46 of file stream-tlm.cpp.
int deinit | ( | mdiadaptlm ** | lm | ) |
Definition at line 548 of file stream-tlm.cpp.
Referenced by main().
int init | ( | mdiadaptlm ** | lm, | |
int | lmtype, | |||
char * | trainfile, | |||
int | size, | |||
int | prunefreq, | |||
double | beta, | |||
int | backoff, | |||
int | dub, | |||
double | oovrate, | |||
int | mcl | |||
) |
Definition at line 471 of file stream-tlm.cpp.
References ngram::dict, ngram::freq, LINEAR_GT, LINEAR_WB, MIXTURE, MOD_SHIFT_BETA, MSHIFTBETA_B, MSHIFTBETA_I, ngram::pushw(), SHIFT_BETA, SHIFT_ONE, SHIFTBETA_B, SHIFTBETA_I, SIMPLE_B, SIMPLE_I, and dictionary::size().
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 103 of file stream-tlm.cpp.
References ARPA, ASR, BIN, dictionary::BoS(), ngramtable::check_dictsize_bound(), CMDDOUBLETYPE, CMDENUMTYPE, CMDINTTYPE, CMDSTRINGTYPE, CMDSUBRANGETYPE, DeclareParams(), dictionary::decode(), deinit(), ngram::dict, ngramtable::dict, dictionary::encode(), dictionary::EoS(), dictionary::freq(), GetParams(), dictionary::incfreq(), init(), INIT, interplm::lmstat(), LOAD, MAX_NGRAM, ngramtable::maxlevel(), NGT, NO, NULL, interplm::prunesingletons(), interplm::prunetopsingletons(), ngramtable::put(), RESET, SAVE, mdiadaptlm::saveARPA(), mdiadaptlm::saveASR(), mdiadaptlm::saveBIN(), dictionary::size(), STOP, interplm::train(), ngram::trans(), TXT, ngram::wordp(), and YES.