lmmacro Class Reference

#include <lmmacro.h>

Inheritance diagram for lmmacro:

Inheritance graph
[legend]
Collaboration diagram for lmmacro:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 lmmacro (std::string lmfilename, std::istream &inp, std::istream &inpMap)
 ~lmmacro ()
bool loadmap (std::string lmfilename, std::istream &inp, std::istream &inpMap)
double lprob (ngram ng)
double clprob (ngram ng)
const char * maxsuffptr (ngram ong, unsigned int *size=NULL)
const char * cmaxsuffptr (ngram ong, unsigned int *size=NULL)
void map (ngram *in, ngram *out)
void One2OneMapping (ngram *in, ngram *out)
void Micro2MacroMapping (ngram *in, ngram *out)
void Micro2MacroMapping (ngram *in, ngram *out, char **lemma)
void cutLex (ngram *in, ngram *out)
void loadLexicalClasses (const char *fn)
dictionarygetDict ()

Public Attributes

dictionarydict
int * microMacroMap
int microMacroMapN
int selectedField
int * lexicaltoken2classMap
int lexicaltoken2classMapN


Detailed Description

Definition at line 40 of file lmmacro.h.


Constructor & Destructor Documentation

lmmacro::lmmacro ( std::string  lmfilename,
std::istream &  inp,
std::istream &  inpMap 
)

lmmacro::~lmmacro (  )  [inline]

Definition at line 52 of file lmmacro.h.


Member Function Documentation

double lmmacro::clprob ( ngram  ng  )  [virtual]

Reimplemented from lmtable.

Definition at line 236 of file lmmacro.cpp.

References ngramcache::add(), cutLex(), ngramcache::get(), lmtable::getDict(), lprob(), map(), lmtable::maxlev, lmtable::probcache, ngram::shift(), and ngram::size.

Here is the call graph for this function:

const char * lmmacro::cmaxsuffptr ( ngram  ong,
unsigned int *  size = NULL 
) [virtual]

Reimplemented from lmtable.

Definition at line 363 of file lmmacro.cpp.

References ngram::dict, lmtable::getDict(), map(), and ngram::trans().

Here is the call graph for this function:

void lmmacro::cutLex ( ngram in,
ngram out 
)

Definition at line 50 of file lmmacro.cpp.

References dictionary::decode(), ngram::dict, ngram::pushw(), ngram::shift(), and ngram::wordp().

Referenced by clprob().

Here is the call graph for this function:

Here is the caller graph for this function:

dictionary* lmmacro::getDict (  )  [inline]

Definition at line 68 of file lmmacro.h.

References dict.

Referenced by loadLexicalClasses(), map(), Micro2MacroMapping(), and One2OneMapping().

Here is the caller graph for this function:

void lmmacro::loadLexicalClasses ( const char *  fn  ) 

bool lmmacro::loadmap ( std::string  lmfilename,
std::istream &  inp,
std::istream &  inpMap 
)

double lmmacro::lprob ( ngram  ng  ) 

Definition at line 207 of file lmmacro.cpp.

References ngram::dict, lmtable::getDict(), map(), lmtable::prob(), and ngram::trans().

Referenced by clprob().

Here is the call graph for this function:

Here is the caller graph for this function:

void lmmacro::map ( ngram in,
ngram out 
)

Definition at line 389 of file lmmacro.cpp.

References getDict(), Micro2MacroMapping(), NULL, One2OneMapping(), ngram::pushw(), ngram::size, ngram::trans(), and ngram::wordp().

Referenced by clprob(), cmaxsuffptr(), lprob(), and maxsuffptr().

Here is the call graph for this function:

Here is the caller graph for this function:

const char * lmmacro::maxsuffptr ( ngram  ong,
unsigned int *  size = NULL 
) [virtual]

Reimplemented from lmtable.

Definition at line 338 of file lmmacro.cpp.

References ngram::dict, lmtable::getDict(), map(), and ngram::trans().

Here is the call graph for this function:

void lmmacro::Micro2MacroMapping ( ngram in,
ngram out,
char **  lemma 
)

Definition at line 554 of file lmmacro.cpp.

References dictionary::decode(), dictionary::encode(), getDict(), lmtable::getDict(), lexicaltoken2classMap, microMacroMap, ngram::pushw(), ngram::shift(), and ngram::size.

Here is the call graph for this function:

void lmmacro::Micro2MacroMapping ( ngram in,
ngram out 
)

Definition at line 516 of file lmmacro.cpp.

References dictionary::decode(), lmtable::getDict(), getDict(), microMacroMap, ngram::pushw(), ngram::size, and ngram::wordp().

Referenced by map().

Here is the call graph for this function:

Here is the caller graph for this function:

void lmmacro::One2OneMapping ( ngram in,
ngram out 
)

Definition at line 499 of file lmmacro.cpp.

References dictionary::decode(), lmtable::getDict(), getDict(), microMacroMap, dictionary::oovcode(), ngram::pushw(), ngram::size, and ngram::wordp().

Referenced by map().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from lmtable.

Definition at line 44 of file lmmacro.h.

Referenced by getDict().

Definition at line 48 of file lmmacro.h.

Referenced by loadLexicalClasses(), and Micro2MacroMapping().

Definition at line 49 of file lmmacro.h.

Referenced by loadLexicalClasses().

Definition at line 45 of file lmmacro.h.

Referenced by Micro2MacroMapping(), and One2OneMapping().

Definition at line 46 of file lmmacro.h.

Definition at line 47 of file lmmacro.h.


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

Generated on Fri Apr 15 13:04:15 2011 for Moses by  doxygen 1.5.9