#include <shiftlm.h>
Public Member Functions | |
shiftbeta (char *ngtfile, int depth=0, int prunefreq=0, double beta=-1, TABLETYPE tt=SHIFTBETA_B) | |
int | train () |
int | discount (ngram ng, int size, double &fstar, double &lambda, int cv=0) |
~shiftbeta () | |
Protected Attributes | |
int | prunethresh |
double * | beta |
Definition at line 37 of file shiftlm.h.
shiftbeta::shiftbeta | ( | char * | ngtfile, | |
int | depth = 0 , |
|||
int | prunefreq = 0 , |
|||
double | beta = -1 , |
|||
TABLETYPE | tt = SHIFTBETA_B | |||
) |
Definition at line 127 of file shiftlm.cpp.
References beta, interplm::lmsize(), and prunethresh.
int shiftbeta::discount | ( | ngram | ng, | |
int | size, | |||
double & | fstar, | |||
double & | lambda, | |||
int | cv = 0 | |||
) | [virtual] |
Reimplemented from mdiadaptlm.
Reimplemented in symshiftbeta.
Definition at line 221 of file shiftlm.cpp.
References beta, ngram::ckhisto(), ngramtable::dict, ngram::freq, ngram::link, dictionary::oovcode(), interplm::prunesingletons(), prunethresh, ngram::succ, ngramtable::succ1(), ngram::trans(), interplm::unigr(), and ngram::wordp().
int shiftbeta::train | ( | ) | [virtual] |
Reimplemented from interplm.
Definition at line 147 of file shiftlm.cpp.
References beta, dictionary::BoS(), CONT, ngram::containsWord(), ngramtable::dict, dictionary::EoS(), ngram::freq, INIT, ngram::link, interplm::lmsize(), dictionary::OOV(), ngram::pushc(), ngramtable::scan(), ngramtable::succ1(), ngramtable::succscan(), and interplm::trainunigr().
double* shiftbeta::beta [protected] |
Definition at line 41 of file shiftlm.h.
Referenced by symshiftbeta::discount(), discount(), shiftbeta(), train(), and ~shiftbeta().
int shiftbeta::prunethresh [protected] |