mdiadaptlm Class Reference

#include <mdiadapt.h>

Inheritance diagram for mdiadaptlm:

Inheritance graph
[legend]
Collaboration diagram for mdiadaptlm:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 mdiadaptlm (char *ngtfile, int depth=0, TABLETYPE tt=FULL)
double zeta (ngram ng, int size)
int discount (ngram ng, int size, double &fstar, double &lambda, int cv=0)
int bodiscount (ngram ng, int size, double &fstar, double &lambda, double &bo)
int compute_backoff ()
double backunig (ngram ng)
double foreunig (ngram ng)
int adapt (char *ngtfile, int alev=1, double gis_step=0.4)
int scalefact (char *ngtfile)
double scalefact (ngram ng)
double prob (ngram ng, int size)
double prob (ngram ng, int size, double &fstar, double &lambda, double &bo)
double prob2 (ngram ng, int size, double &fstar)
double txclprob (ngram ng, int size)
int saveASR (char *filename, int backoff, char *subdictfile=NULL)
int saveMT (char *filename, int backoff, char *subdictfile=NULL, int resolution=10000000, double decay=0.999900)
int saveARPA (char *filename, int backoff=0, char *subdictfile=NULL)
int netsize ()
 ~mdiadaptlm ()
double myround (double x)

Public Attributes

normcachecache
double gis_step


Constructor & Destructor Documentation

mdiadaptlm::mdiadaptlm ( char *  ngtfile,
int  depth = 0,
TABLETYPE  tt = FULL 
)

References cache, and NULL.

mdiadaptlm::~mdiadaptlm (  )  [inline]

References cache.


Member Function Documentation

int mdiadaptlm::adapt ( char *  ngtfile,
int  alev = 1,
double  gis_step = 0.4 
)

References backunig(), ngramtable::dict, gis_step, interplm::lmsize(), NULL, scalefact(), dictionary::size(), ngram::wordp(), and zeta().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

double mdiadaptlm::backunig ( ngram  ng  ) 

References discount().

Referenced by adapt(), and scalefact().

Here is the call graph for this function:

Here is the caller graph for this function:

int mdiadaptlm::bodiscount ( ngram  ng,
int  size,
double &  fstar,
double &  lambda,
double &  bo 
)

References interplm::backoff, ngramtable::boff(), ngramtable::dict, discount(), ngram::link, and ngram::trans().

Referenced by prob(), saveARPA(), saveASR(), and saveMT().

Here is the call graph for this function:

Here is the caller graph for this function:

int mdiadaptlm::compute_backoff (  ) 

References interplm::backoff, ngramtable::boff(), CONT, ngramtable::dict, discount(), INIT, ngram::link, interplm::lmsize(), prob(), ngram::pushc(), ngramtable::scan(), and ngramtable::succscan().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int mdiadaptlm::discount ( ngram  ng,
int  size,
double &  fstar,
double &  lambda,
int  cv = 0 
) [virtual]

Reimplemented from interplm.

Reimplemented in linearwb, mixture, shiftone, shiftbeta, symshiftbeta, and mshiftbeta.

References ngramtable::dict, scalefact(), ngram::trans(), and zeta().

Referenced by backunig(), bodiscount(), compute_backoff(), netsize(), prob2(), saveASR(), saveMT(), txclprob(), and zeta().

Here is the call graph for this function:

Here is the caller graph for this function:

double mdiadaptlm::foreunig ( ngram  ng  ) 

References interplm::discount().

Referenced by scalefact().

Here is the call graph for this function:

Here is the caller graph for this function:

double mdiadaptlm::myround ( double  x  )  [inline]

Reimplemented from ngramtable.

int mdiadaptlm::netsize (  )  [virtual]

Reimplemented from interplm.

References CONT, ngramtable::dict, discount(), INIT, ngramtable::maxlevel(), ngramtable::scan(), and dictionary::size().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

double mdiadaptlm::prob ( ngram  ng,
int  size,
double &  fstar,
double &  lambda,
double &  bo 
)

References interplm::backoff, bodiscount(), and prob().

Here is the call graph for this function:

double mdiadaptlm::prob ( ngram  ng,
int  size 
) [virtual]

Reimplemented from interplm.

Referenced by compute_backoff(), main(), prob(), prob2(), saveARPA(), saveASR(), saveMT(), and mixture::train().

Here is the caller graph for this function:

double mdiadaptlm::prob2 ( ngram  ng,
int  size,
double &  fstar 
)

References discount(), and prob().

Here is the call graph for this function:

int mdiadaptlm::saveARPA ( char *  filename,
int  backoff = 0,
char *  subdictfile = NULL 
)

int mdiadaptlm::saveASR ( char *  filename,
int  backoff,
char *  subdictfile = NULL 
)

int mdiadaptlm::saveMT ( char *  filename,
int  backoff,
char *  subdictfile = NULL,
int  resolution = 10000000,
double  decay = 0.999900 
)

double mdiadaptlm::scalefact ( ngram  ng  ) 

References backunig(), ngramtable::dict, foreunig(), gis_step, dictionary::oovcode(), ngram::trans(), and ngram::wordp().

Here is the call graph for this function:

int mdiadaptlm::scalefact ( char *  ngtfile  ) 

References backunig(), cache, ngramtable::dict, foreunig(), NULL, dictionary::oovcode(), dictionary::size(), interplm::train(), ngram::trans(), and ngram::wordp().

Referenced by adapt(), discount(), and zeta().

Here is the call graph for this function:

Here is the caller graph for this function:

double mdiadaptlm::txclprob ( ngram  ng,
int  size 
)

double mdiadaptlm::zeta ( ngram  ng,
int  size 
)

References cache, CONT, discount(), normcache::get(), INIT, normcache::put(), scalefact(), ngram::size, and ngramtable::succscan().

Referenced by adapt(), and discount().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Referenced by adapt(), and scalefact().


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

Generated on Fri Jul 30 20:05:15 2010 for Moses by  doxygen 1.5.9