lmclass Class Reference

#include <lmclass.h>

Inheritance diagram for lmclass:

Inheritance graph
[legend]
Collaboration diagram for lmclass:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 lmclass (float nlf=0.0, float dlfi=0.0)
 ~lmclass ()
void load (const std::string filename, int mmap=0)
double lprob (ngram ng, double *bow=NULL, int *bol=NULL, char **maxsuffptr=NULL, unsigned int *statesize=NULL, bool *extendible=NULL)
double clprob (ngram ng, double *bow=NULL, int *bol=NULL, char **maxsuffptr=NULL, unsigned int *statesize=NULL, bool *extendible=NULL)
double clprob (int *ng, int ngsize, double *bow=NULL, int *bol=NULL, char **maxsuffptr=NULL, unsigned int *statesize=NULL, bool *extendible=NULL)
dictionarygetDict () const
virtual void dictionary_incflag (const bool flag)

Protected Member Functions

void loadMap (std::istream &inp)
void loadMapElement (const char *in, const char *out, double sc)
void mapping (ngram &in, ngram &out)
double getMapScore (int wcode)
size_t getMap (int wcode)
void checkMap ()


Detailed Description

Definition at line 40 of file lmclass.h.


Constructor & Destructor Documentation

lmclass::lmclass ( float  nlf = 0.0,
float  dlfi = 0.0 
)

Definition at line 55 of file lmclass.cpp.

References NULL.

lmclass::~lmclass (  ) 

Definition at line 64 of file lmclass.cpp.


Member Function Documentation

void lmclass::checkMap (  )  [protected]

Definition at line 186 of file lmclass.cpp.

References VERBOSE.

double lmclass::clprob ( int *  ng,
int  ngsize,
double *  bow = NULL,
int *  bol = NULL,
char **  maxsuffptr = NULL,
unsigned int *  statesize = NULL,
bool *  extendible = NULL 
) [inline, virtual]

Reimplemented from lmtable.

Definition at line 81 of file lmclass.h.

References lmtable::bow(), getDict(), lprob(), lmtable::maxsuffptr(), and ngram::pushc().

Here is the call graph for this function:

double lmclass::clprob ( ngram  ng,
double *  bow = NULL,
int *  bol = NULL,
char **  maxsuffptr = NULL,
unsigned int *  statesize = NULL,
bool *  extendible = NULL 
) [inline, virtual]

Reimplemented from lmtable.

Definition at line 78 of file lmclass.h.

References lmtable::bow(), lprob(), and lmtable::maxsuffptr().

Referenced by lprob().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void lmclass::dictionary_incflag ( const bool  flag  )  [inline, virtual]

Reimplemented from lmtable.

Definition at line 90 of file lmclass.h.

References dictionary::incflag().

Here is the call graph for this function:

dictionary* lmclass::getDict (  )  const [inline, virtual]

Reimplemented from lmtable.

Definition at line 87 of file lmclass.h.

Referenced by clprob(), getMap(), getMapScore(), and load().

Here is the caller graph for this function:

size_t lmclass::getMap ( int  wcode  )  [inline, protected]

Definition at line 60 of file lmclass.h.

References dictionary::freq(), getDict(), and dictionary::oovcode().

Referenced by load(), and mapping().

Here is the call graph for this function:

Here is the caller graph for this function:

double lmclass::getMapScore ( int  wcode  )  [inline, protected]

Definition at line 52 of file lmclass.h.

References getDict(), and dictionary::oovcode().

Referenced by lprob().

Here is the call graph for this function:

Here is the caller graph for this function:

void lmclass::load ( const std::string  filename,
int  mmap = 0 
) [virtual]

Reimplemented from lmtable.

Definition at line 70 of file lmclass.cpp.

References error(), dictionary::genoovcode(), getDict(), getMap(), dictionary::incflag(), loadMap(), MAX_LINE, MAX_TOKEN, lmContainer::maxlev, NULL, parseWords(), and VERBOSE.

Here is the call graph for this function:

void lmclass::loadMap ( std::istream &  inp  )  [protected]

Referenced by load().

Here is the caller graph for this function:

void lmclass::loadMapElement ( const char *  in,
const char *  out,
double  sc 
) [protected]

Definition at line 195 of file lmclass.cpp.

References lmtable::dict, dictionary::encode(), dictionary::freq(), and VERBOSE.

Here is the call graph for this function:

double lmclass::lprob ( ngram  ng,
double *  bow = NULL,
int *  bol = NULL,
char **  maxsuffptr = NULL,
unsigned int *  statesize = NULL,
bool *  extendible = NULL 
)

Definition at line 207 of file lmclass.cpp.

References clprob(), lmtable::getDict(), getMapScore(), mapping(), VERBOSE, and ngram::wordp().

Referenced by clprob().

Here is the call graph for this function:

Here is the caller graph for this function:

void lmclass::mapping ( ngram in,
ngram out 
) [protected]

Definition at line 224 of file lmclass.cpp.

References getMap(), ngram::pushc(), ngram::size, VERBOSE, and ngram::wordp().

Referenced by lprob().

Here is the call graph for this function:

Here is the caller graph for this function:


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