#include <interplm.h>


Public Member Functions | |
| interplm (char *ngtfile, int depth=0, TABLETYPE tt=FULL) | |
| int | prunesingletons (int flag=-1) |
| int | prunetopsingletons (int flag=-1) |
| void | gencorrcounts () |
| void | gensuccstat () |
| virtual int | dub () |
| virtual int | dub (int value) |
| int | setusmooth (int v=0) |
| double | setepsilon (double v=1.0) |
| void | trainunigr () |
| double | unigr (ngram ng) |
| double | zerofreq (int lev) |
| int | lmsize () |
| int | obswrd () |
| virtual int | train () |
| virtual void | adapt (char *, double) |
| virtual double | prob (ngram, int) |
| virtual double | boprob (ngram, int) |
| void | test_ngt (ngramtable &ngt, int sz=0, int backoff=0, int checkpr=0) |
| void | test_txt (char *filename, int sz=0, int backoff=0, int checkpr=0, char *outpr=NULL) |
| void | test (char *filename, int sz, int backoff=0, int checkpr=0, char *outpr=NULL) |
| virtual int | discount (ngram, int, double &, double &, int=0) |
| virtual int | savebin (char *, int) |
| virtual int | netsize () |
| void | lmstat (int level) |
| virtual | ~interplm () |
Public Attributes | |
| int | backoff |
| ngramtable * | unitbl |
Definition at line 35 of file interplm.h.
| interplm::interplm | ( | char * | ngtfile, | |
| int | depth = 0, |
|||
| TABLETYPE | tt = FULL | |||
| ) |
Definition at line 78 of file interplm.cpp.
References dictionary::BoS(), dictionary::decode(), ngramtable::dict, dictionary::encode(), dictionary::freq(), ngramtable::maxlevel(), NULL, dictionary::oovcode(), and unitbl.

| virtual interplm::~interplm | ( | ) | [inline, virtual] |
Definition at line 134 of file interplm.h.
| virtual void interplm::adapt | ( | char * | , | |
| double | ||||
| ) | [inline, virtual] |
Definition at line 102 of file interplm.h.
| virtual double interplm::boprob | ( | ngram | , | |
| int | ||||
| ) | [inline, virtual] |
Definition at line 108 of file interplm.h.
| virtual int interplm::discount | ( | ngram | , | |
| int | , | |||
| double & | , | |||
| double & | , | |||
| int | = 0 | |||
| ) | [inline, virtual] |
Reimplemented in linearwb, mdiadaptlm, mixture, shiftone, shiftbeta, symshiftbeta, and mshiftbeta.
Definition at line 118 of file interplm.h.
Referenced by mixture::discount(), mdiadaptlm::foreunig(), and mixture::train().

| virtual int interplm::dub | ( | int | value | ) | [inline, virtual] |
Reimplemented in mixture.
Definition at line 70 of file interplm.h.
References ngramtable::dict, and dictionary::dub().

| virtual int interplm::dub | ( | ) | [inline, virtual] |
Reimplemented in mixture.
Definition at line 66 of file interplm.h.
References ngramtable::dict, and dictionary::dub().
Referenced by mixture::dub(), main(), and mixture::train().


| void interplm::gencorrcounts | ( | ) |
Definition at line 146 of file interplm.cpp.
References dictionary::BoS(), ngramtable::btotfreq(), CONT, ngram::containsWord(), ngramtable::corrcounts, count, ngramtable::dict, dictionary::encode(), ngramtable::freq(), ngram::freq, ngramtable::getfreq(), INIT, ngram::link, ngramtable::maxlevel(), dictionary::oovcode(), ngram::pinfo, ngram::pushw(), ngramtable::put(), ngramtable::scan(), ngramtable::setfreq(), dictionary::size(), ngram::size, and ngram::wordp().
Referenced by mshiftbeta::train().


| void interplm::gensuccstat | ( | ) |
Definition at line 107 of file interplm.cpp.
References CONT, ngramtable::corrcounts, ngramtable::dict, ngram::freq, ngramtable::getfreq(), INIT, ngram::link, ngram::pinfo, ngram::pushc(), ngramtable::scan(), ngramtable::succ1(), ngramtable::succ2(), and ngramtable::succscan().
Referenced by mshiftbeta::train(), and linearwb::train().


| int interplm::lmsize | ( | ) | [inline] |
Definition at line 90 of file interplm.h.
Referenced by mdiadaptlm::adapt(), mdiadaptlm::caches_stat(), mdiadaptlm::compute_backoff_per_level(), mdiadaptlm::create_caches(), mshiftbeta::discount(), mixture::loadpar(), mshiftbeta::mfreq(), mdiadaptlm::saveARPA_per_level(), mdiadaptlm::saveARPA_per_word(), mdiadaptlm::saveASR(), mdiadaptlm::saveBIN_per_level(), mdiadaptlm::saveBIN_per_word(), mdiadaptlm::saveMT(), mixture::savepar(), shiftbeta::shiftbeta(), test(), mshiftbeta::train(), shiftbeta::train(), mixture::train(), and mixture::~mixture().

| void interplm::lmstat | ( | int | level | ) | [inline] |
Definition at line 130 of file interplm.h.
References ngramtable::stat().
Referenced by main().


| virtual int interplm::netsize | ( | ) | [inline, virtual] |
| int interplm::obswrd | ( | ) | [inline] |
Definition at line 94 of file interplm.h.
References ngramtable::dict, and dictionary::size().
Referenced by test_ngt(), and test_txt().


| virtual double interplm::prob | ( | ngram | , | |
| int | ||||
| ) | [inline, virtual] |
Reimplemented in mdiadaptlm.
Definition at line 104 of file interplm.h.
Referenced by test_ngt(), and test_txt().

| int interplm::prunesingletons | ( | int | flag = -1 |
) | [inline] |
Definition at line 54 of file interplm.h.
Referenced by mshiftbeta::discount(), shiftbeta::discount(), linearwb::discount(), main(), and mixture::mixture().

| int interplm::prunetopsingletons | ( | int | flag = -1 |
) | [inline] |
Definition at line 58 of file interplm.h.
Referenced by mshiftbeta::discount(), main(), and mixture::mixture().

| virtual int interplm::savebin | ( | char * | , | |
| int | ||||
| ) | [inline, virtual] |
| double interplm::setepsilon | ( | double | v = 1.0 |
) | [inline] |
Definition at line 78 of file interplm.h.
| int interplm::setusmooth | ( | int | v = 0 |
) | [inline] |
Definition at line 74 of file interplm.h.
| void interplm::test | ( | char * | filename, | |
| int | sz, | |||
| int | backoff = 0, |
|||
| int | checkpr = 0, |
|||
| char * | outpr = NULL | |||
| ) |
Definition at line 338 of file interplm.cpp.
References mfstream::close(), COUNT, lmsize(), NULL, test_ngt(), and test_txt().
Referenced by main().


| void interplm::test_ngt | ( | ngramtable & | ngt, | |
| int | sz = 0, |
|||
| int | backoff = 0, |
|||
| int | checkpr = 0 | |||
| ) |
Definition at line 435 of file interplm.cpp.
References dictionary::BoS(), CONT, ngramtable::dict, dictionary::dub(), dictionary::encode(), ngram::freq, INIT, ngramtable::maxlevel(), n, obswrd(), dictionary::oovcode(), prob(), ngramtable::scan(), dictionary::size(), ngram::size, ngram::trans(), and ngram::wordp().
Referenced by test().


| void interplm::test_txt | ( | char * | filename, | |
| int | sz = 0, |
|||
| int | backoff = 0, |
|||
| int | checkpr = 0, |
|||
| char * | outpr = NULL | |||
| ) |
Definition at line 362 of file interplm.cpp.
References dictionary::BoS(), mfstream::close(), ngramtable::dict, dictionary::dub(), dictionary::encode(), n, obswrd(), dictionary::oovcode(), prob(), dictionary::size(), ngram::size, and ngram::wordp().
Referenced by test().


| virtual int interplm::train | ( | ) | [inline, virtual] |
Reimplemented in linearwb, mixture, shiftone, shiftbeta, and mshiftbeta.
Definition at line 98 of file interplm.h.
Referenced by main(), mdiadaptlm::scalefact(), and mixture::train().

| void interplm::trainunigr | ( | ) |
Definition at line 35 of file interplm.cpp.
References ngramtable::dict, dictionary::dub(), dictionary::encode(), dictionary::freq(), dictionary::getcode(), dictionary::incfreq(), dictionary::OOV(), dictionary::oovcode(), dictionary::size(), and dictionary::totfreq().
Referenced by mshiftbeta::train(), shiftbeta::train(), shiftone::train(), and linearwb::train().


| double interplm::unigr | ( | ngram | ng | ) |
Definition at line 68 of file interplm.cpp.
References ngramtable::dict, dictionary::freq(), dictionary::size(), dictionary::totfreq(), and ngram::wordp().
Referenced by symshiftbeta::discount(), shiftbeta::discount(), shiftone::discount(), and linearwb::discount().


| double interplm::zerofreq | ( | int | lev | ) |
Definition at line 321 of file interplm.cpp.
References CONT, ngramtable::dict, ngram::freq, INIT, dictionary::oovcode(), ngramtable::scan(), and ngram::wordp().
Referenced by mixture::train().


Definition at line 50 of file interplm.h.
Referenced by mdiadaptlm::bodiscount(), mdiadaptlm::compute_backoff_per_level(), mdiadaptlm::prob(), mdiadaptlm::saveARPA(), mdiadaptlm::saveBIN(), and mixture::train().
1.5.9