#include <mixture.h>
Public Member Functions | |
mixture (bool fulltable, char *sublminfo, int depth, int prunefreq=0, char *ipfile=NULL, char *opfile=NULL) | |
int | train () |
int | savepar (char *opf) |
int | loadpar (char *opf) |
int | dub () |
int | dub (int value) |
void | settying (int a, int b) |
int | discount (ngram ng, int size, double &fstar, double &lambda, int cv=0) |
~mixture () | |
int | get (ngram &ng, int n, int lev) |
Public Attributes | |
bool | usefulltable |
Definition at line 28 of file mixture.h.
mixture::mixture | ( | bool | fulltable, | |
char * | sublminfo, | |||
int | depth, | |||
int | prunefreq = 0 , |
|||
char * | ipfile = NULL , |
|||
char * | opfile = NULL | |||
) |
Definition at line 60 of file mixture.cpp.
References ngramtable::augment(), dictionary::augment(), CMDBOOLTYPE, CMDENUMTYPE, CMDMSG, CMDSTRINGTYPE, CMDSUBRANGETYPE, DeclareParams(), ngramtable::dict, dictionary::genoovcode(), GetParams(), LINEAR_WB, MAX_LINE, MIXTURE, MOD_SHIFT_BETA, MSHIFTBETA_I, NULL, interplm::prunesingletons(), interplm::prunetopsingletons(), SHIFT_BETA, SHIFT_ONE, SHIFTBETA_I, SIMPLE_I, dictionary::size(), usefulltable, and ngramtable::word().
mixture::~mixture | ( | ) | [inline] |
Definition at line 74 of file mixture.h.
References interplm::lmsize().
int mixture::discount | ( | ngram | ng, | |
int | size, | |||
double & | fstar, | |||
double & | lambda, | |||
int | cv = 0 | |||
) | [virtual] |
Reimplemented from mdiadaptlm.
Definition at line 455 of file mixture.cpp.
References ngramtable::dict, interplm::discount(), dictionary::dub(), LOWER_DOUBLE_PRECISION_OF_1, dictionary::oovcode(), dictionary::size(), ngram::trans(), UPPER_DOUBLE_PRECISION_OF_1, and ngram::wordp().
int mixture::dub | ( | int | value | ) | [inline, virtual] |
Reimplemented from interplm.
Definition at line 59 of file mixture.h.
References ngramtable::dict, dictionary::dub(), and interplm::dub().
int mixture::dub | ( | ) | [inline, virtual] |
Reimplemented from interplm.
Definition at line 55 of file mixture.h.
References ngramtable::dict, and dictionary::dub().
Referenced by train().
int mixture::get | ( | ngram & | ng, | |
int | n, | |||
int | lev | |||
) | [virtual] |
Reimplemented from ngramtable.
Definition at line 498 of file mixture.cpp.
References CONT, ngramtable::dict, ngram::info, INIT, ngram::link, ngramtable::maxlevel(), ngramtable::put(), ngramtable::resetngramtable(), ngramtable::scan(), ngram::size, ngram::trans(), usefulltable, and ngram::wordp().
int mixture::loadpar | ( | char * | opf | ) |
Definition at line 274 of file mixture.cpp.
References interplm::lmsize(), and mfstream::readx().
Referenced by train().
int mixture::savepar | ( | char * | opf | ) |
Definition at line 258 of file mixture.cpp.
References interplm::lmsize(), and mfstream::writex().
Referenced by train().
int mixture::train | ( | ) | [virtual] |
Reimplemented from interplm.
Definition at line 304 of file mixture.cpp.
References interplm::backoff, CONT, ngramtable::dict, interplm::discount(), dictionary::dub(), interplm::dub(), dub(), dictionary::encode(), ngram::freq, INIT, k, interplm::lmsize(), loadpar(), dictionary::OOV(), dictionary::oovcode(), mdiadaptlm::prob(), savepar(), ngramtable::scan(), dictionary::size(), interplm::train(), ngram::wordp(), and interplm::zerofreq().