interplm Class Reference

#include <interplm.h>

Inheritance diagram for interplm:

Inheritance graph
[legend]
Collaboration diagram for interplm:

Collaboration graph
[legend]

List of all members.

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
ngramtableunitbl


Detailed Description

Definition at line 35 of file interplm.h.


Constructor & Destructor Documentation

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.

Here is the call graph for this function:

virtual interplm::~interplm (  )  [inline, virtual]

Definition at line 134 of file interplm.h.


Member Function Documentation

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void interplm::gencorrcounts (  ) 

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int interplm::lmsize (  )  [inline]

void interplm::lmstat ( int  level  )  [inline]

Definition at line 130 of file interplm.h.

References ngramtable::stat().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int interplm::netsize (  )  [inline, virtual]

Reimplemented in mdiadaptlm.

Definition at line 126 of file interplm.h.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

int interplm::prunetopsingletons ( int  flag = -1  )  [inline]

Definition at line 58 of file interplm.h.

Referenced by mshiftbeta::discount(), main(), and mixture::mixture().

Here is the caller graph for this function:

virtual int interplm::savebin ( char *  ,
int   
) [inline, virtual]

Reimplemented from ngramtable.

Definition at line 122 of file interplm.h.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

void interplm::trainunigr (  ) 

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 82 of file interplm.h.

Referenced by interplm().


The documentation for this class was generated from the following files:

Generated on Thu Jul 6 00:31:48 2017 for Moses by  doxygen 1.5.9