lmContainer Class Reference

#include <lmContainer.h>

Inheritance diagram for lmContainer:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 lmContainer ()
virtual ~lmContainer ()
virtual void load (const std::string filename, int mmap=0)
virtual void savetxt (const char *filename)
virtual void savebin (const char *filename)
virtual double getlogOOVpenalty () const
virtual double setlogOOVpenalty (int dub)
virtual double setlogOOVpenalty (double oovp)
virtual dictionary * getDict () const
virtual void maxlevel (int lev)
virtual int maxlevel () const
virtual void stat (int lev=0)
virtual void setMaxLoadedLevel (int lev)
virtual int getMaxLoadedLevel ()
virtual bool is_inverted (const bool flag)
virtual bool is_inverted ()
virtual double clprob (ngram ng, double *bow=NULL, int *bol=NULL, char **maxsuffptr=NULL, unsigned int *statesize=NULL, bool *extendible=NULL)
virtual double clprob (int *ng, int ngsize, double *bow=NULL, int *bol=NULL, char **maxsuffptr=NULL, unsigned int *statesize=NULL, bool *extendible=NULL)
virtual void used_caches ()
virtual void init_caches (int uptolev)
virtual void check_caches_levels ()
virtual void reset_caches ()
virtual void reset_mmap ()
void setLanguageModelType (int type)
int getLanguageModelType ()
int getLanguageModelType (std::string filename)
virtual void dictionary_incflag (const bool flag)
virtual bool filter (const string sfilter, lmContainer *&sublmt, const string skeepunigrams)
lmContainer * CreateLanguageModel (const std::string infile, float nlf=0.0, float dlf=0.0)
lmContainer * CreateLanguageModel (int type, float nlf=0.0, float dlf=0.0)
virtual bool is_OOV (int code)
bool is_lmt_cache_enabled ()
bool is_ps_cache_enabled ()
bool is_cache_enabled ()

Protected Attributes

int lmtype
int maxlev
int requiredMaxlev


Detailed Description

Definition at line 42 of file lmContainer.h.


Constructor & Destructor Documentation

lmContainer::lmContainer (  ) 

Definition at line 43 of file lmContainer.cpp.

References requiredMaxlev.

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

Definition at line 54 of file lmContainer.h.


Member Function Documentation

virtual void lmContainer::check_caches_levels (  )  [inline, virtual]

Reimplemented in lmtable.

Definition at line 131 of file lmContainer.h.

Referenced by main().

Here is the caller graph for this function:

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

Reimplemented in lmclass, lmInterpolation, lmmacro, and lmtable.

Definition at line 116 of file lmContainer.h.

References UNUSED.

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

Reimplemented in lmclass, lmInterpolation, lmmacro, and lmtable.

Definition at line 107 of file lmContainer.h.

References UNUSED.

Referenced by Moses::LanguageModelIRST::CalcScore(), Moses::LanguageModelIRST::EvaluateWhenApplied(), and main().

Here is the caller graph for this function:

lmContainer * lmContainer::CreateLanguageModel ( int  type,
float  nlf = 0.0,
float  dlf = 0.0 
)

Definition at line 87 of file lmContainer.cpp.

References _IRSTLM_LMCLASS, _IRSTLM_LMINTERPOLATION, _IRSTLM_LMMACRO, _IRSTLM_LMTABLE, NULL, and setLanguageModelType().

Here is the call graph for this function:

lmContainer * lmContainer::CreateLanguageModel ( const std::string  infile,
float  nlf = 0.0,
float  dlf = 0.0 
)

Definition at line 79 of file lmContainer.cpp.

References getLanguageModelType().

Referenced by filter(), Moses::LanguageModelIRST::Load(), lmInterpolation::load_lm(), load_lm(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in lmclass, lmInterpolation, lmmacro, and lmtable.

Definition at line 144 of file lmContainer.h.

References UNUSED.

Referenced by main().

Here is the caller graph for this function:

bool lmContainer::filter ( const string  sfilter,
lmContainer *&  sublmt,
const string  skeepunigrams 
) [virtual]

Definition at line 123 of file lmContainer.cpp.

References _IRSTLM_LMTABLE, CreateLanguageModel(), getMaxLoadedLevel(), is_inverted(), lmtype, maxlevel(), and setMaxLoadedLevel().

Here is the call graph for this function:

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

Reimplemented in lmclass, lmInterpolation, lmmacro, and lmtable.

Definition at line 80 of file lmContainer.h.

References NULL.

Referenced by Moses::LanguageModelIRST::Load(), and main().

Here is the caller graph for this function:

int lmContainer::getLanguageModelType ( std::string  filename  ) 

int lmContainer::getLanguageModelType (  )  [inline]

Definition at line 139 of file lmContainer.h.

References lmtype.

Referenced by CreateLanguageModel(), and main().

Here is the caller graph for this function:

virtual double lmContainer::getlogOOVpenalty (  )  const [inline, virtual]

Reimplemented in lmInterpolation, and lmtable.

Definition at line 68 of file lmContainer.h.

Referenced by main().

Here is the caller graph for this function:

virtual int lmContainer::getMaxLoadedLevel (  )  [inline, virtual]

Definition at line 96 of file lmContainer.h.

References requiredMaxlev.

Referenced by filter().

Here is the caller graph for this function:

virtual void lmContainer::init_caches ( int  uptolev  )  [inline, virtual]

Reimplemented in lmtable.

Definition at line 128 of file lmContainer.h.

References UNUSED.

Referenced by Moses::LanguageModelIRST::Load(), lmInterpolation::load_lm(), load_lm(), and main().

Here is the caller graph for this function:

bool lmContainer::is_cache_enabled (  )  [inline]

Definition at line 173 of file lmContainer.h.

References is_lmt_cache_enabled(), and is_ps_cache_enabled().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool lmContainer::is_inverted (  )  [inline, virtual]

Reimplemented in lmInterpolation, and lmtable.

Definition at line 104 of file lmContainer.h.

Referenced by filter().

Here is the caller graph for this function:

virtual bool lmContainer::is_inverted ( const bool  flag  )  [inline, virtual]

Reimplemented in lmInterpolation, and lmtable.

Definition at line 100 of file lmContainer.h.

References UNUSED.

Referenced by filter(), lmInterpolation::load_lm(), and main().

Here is the caller graph for this function:

bool lmContainer::is_lmt_cache_enabled (  )  [inline]

Definition at line 159 of file lmContainer.h.

Referenced by is_cache_enabled().

Here is the caller graph for this function:

virtual bool lmContainer::is_OOV ( int  code  )  [inline, virtual]

Reimplemented in lmInterpolation, and lmtable.

Definition at line 153 of file lmContainer.h.

References UNUSED.

Referenced by main().

Here is the caller graph for this function:

bool lmContainer::is_ps_cache_enabled (  )  [inline]

Definition at line 166 of file lmContainer.h.

Referenced by is_cache_enabled().

Here is the caller graph for this function:

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

Reimplemented in lmclass, lmInterpolation, lmmacro, and lmtable.

Definition at line 56 of file lmContainer.h.

References UNUSED.

Referenced by Moses::LanguageModelIRST::Load(), lmInterpolation::load_lm(), load_lm(), and main().

Here is the caller graph for this function:

virtual int lmContainer::maxlevel (  )  const [inline, virtual]

Reimplemented in lmInterpolation, lmmacro, and lmtable.

Definition at line 86 of file lmContainer.h.

References maxlev.

Referenced by filter().

Here is the caller graph for this function:

virtual void lmContainer::maxlevel ( int  lev  )  [inline, virtual]

Definition at line 83 of file lmContainer.h.

References maxlev.

Referenced by filter(), Moses::LanguageModelIRST::Load(), lmInterpolation::load_lm(), load_lm(), and main().

Here is the caller graph for this function:

virtual void lmContainer::reset_caches (  )  [inline, virtual]

Reimplemented in lmtable.

Definition at line 132 of file lmContainer.h.

Referenced by Moses::LanguageModelIRST::CleanUpAfterSentenceProcessing().

Here is the caller graph for this function:

virtual void lmContainer::reset_mmap (  )  [inline, virtual]

Reimplemented in lmtable.

Definition at line 134 of file lmContainer.h.

Referenced by Moses::LanguageModelIRST::~LanguageModelIRST().

Here is the caller graph for this function:

virtual void lmContainer::savebin ( const char *  filename  )  [inline, virtual]

Reimplemented in lmtable.

Definition at line 64 of file lmContainer.h.

References UNUSED.

Referenced by main().

Here is the caller graph for this function:

virtual void lmContainer::savetxt ( const char *  filename  )  [inline, virtual]

Reimplemented in lmtable.

Definition at line 61 of file lmContainer.h.

References UNUSED.

Referenced by main().

Here is the caller graph for this function:

void lmContainer::setLanguageModelType ( int  type  )  [inline]

Definition at line 136 of file lmContainer.h.

References lmtype.

Referenced by CreateLanguageModel().

Here is the caller graph for this function:

virtual double lmContainer::setlogOOVpenalty ( double  oovp  )  [inline, virtual]

Reimplemented in lmInterpolation, and lmtable.

Definition at line 75 of file lmContainer.h.

References UNUSED.

virtual double lmContainer::setlogOOVpenalty ( int  dub  )  [inline, virtual]

Reimplemented in lmInterpolation, and lmtable.

Definition at line 71 of file lmContainer.h.

References UNUSED.

Referenced by Moses::LanguageModelIRST::Load(), load_lm(), and main().

Here is the caller graph for this function:

virtual void lmContainer::setMaxLoadedLevel ( int  lev  )  [inline, virtual]

Definition at line 93 of file lmContainer.h.

References requiredMaxlev.

Referenced by filter(), Moses::LanguageModelIRST::Load(), lmtable::load(), lmInterpolation::load_lm(), load_lm(), and main().

Here is the caller graph for this function:

virtual void lmContainer::stat ( int  lev = 0  )  [inline, virtual]

Reimplemented in lmtable.

Definition at line 89 of file lmContainer.h.

References UNUSED.

Referenced by main().

Here is the caller graph for this function:

virtual void lmContainer::used_caches (  )  [inline, virtual]

Reimplemented in lmtable.

Definition at line 127 of file lmContainer.h.

Referenced by main().

Here is the caller graph for this function:


Member Data Documentation

int lmContainer::lmtype [protected]

Definition at line 47 of file lmContainer.h.

Referenced by filter(), getLanguageModelType(), and setLanguageModelType().

int lmContainer::maxlev [protected]

int lmContainer::requiredMaxlev [protected]


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