#include <shiftlm.h>


Public Member Functions | |
| mshiftbeta (char *ngtfile, int depth=0, int prunefreq=0, TABLETYPE tt=MSHIFTBETA_B) | |
| int | train () | 
| int | discount (ngram ng, int size, double &fstar, double &lambda, int cv=0) | 
| ~mshiftbeta () | |
| int | mfreq (ngram &ng, int l) | 
Protected Attributes | |
| int | prunethresh | 
| double | beta [3][MAX_NGRAM] | 
| ngramtable * | tb [MAX_NGRAM] | 
| double | oovsum | 
Definition at line 63 of file shiftlm.h.
| mshiftbeta::mshiftbeta | ( | char * | ngtfile, | |
| int |  depth = 0,  | 
        |||
| int |  prunefreq = 0,  | 
        |||
| TABLETYPE |  tt = MSHIFTBETA_B | |||
| ) | 
| int mshiftbeta::discount | ( | ngram | ng, | |
| int | size, | |||
| double & | fstar, | |||
| double & | lambda, | |||
| int |  cv = 0 | |||
| ) |  [virtual] | 
        
Reimplemented from mdiadaptlm.
Definition at line 427 of file shiftlm.cpp.
References beta, ngramtable::btotfreq(), ngram::ckhisto(), dictionary::decode(), ngramtable::dict, ngram::freq, ngram::link, interplm::lmsize(), ngramtable::maxlevel(), mfreq(), dictionary::oovcode(), interplm::prunesingletons(), prunethresh, interplm::prunetopsingletons(), ngram::succ, ngramtable::succ1(), ngramtable::succ2(), ngramtable::totfreq(), ngram::trans(), and ngram::wordp().

| int mshiftbeta::mfreq | ( | ngram & | ng, | |
| int | l | |||
| ) |  [inline] | 
        
Definition at line 79 of file shiftlm.h.
References ngram::freq, ngramtable::getfreq(), ngram::link, interplm::lmsize(), and ngram::pinfo.
Referenced by discount(), and train().


| int mshiftbeta::train | ( | ) |  [virtual] | 
        
Reimplemented from interplm.
Definition at line 317 of file shiftlm.cpp.
References beta, dictionary::BoS(), CONT, ngram::containsWord(), ngramtable::dict, dictionary::EoS(), ngram::freq, interplm::gencorrcounts(), interplm::gensuccstat(), INIT, interplm::lmsize(), mfreq(), dictionary::OOV(), oovsum, ngramtable::scan(), and interplm::trainunigr().

double mshiftbeta::beta[3][MAX_NGRAM] [protected]           | 
        
double mshiftbeta::oovsum [protected]           | 
        
int mshiftbeta::prunethresh [protected]           | 
        
ngramtable* mshiftbeta::tb[MAX_NGRAM] [protected]           | 
        
 1.5.9