#include <lmclass.h>


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) | 
| dictionary * | getDict () 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 () | 
Definition at line 40 of file lmclass.h.
| lmclass::lmclass | ( | float |  nlf = 0.0,  | 
        |
| float |  dlfi = 0.0 | |||
| ) | 
| lmclass::~lmclass | ( | ) | 
Definition at line 64 of file lmclass.cpp.
| void lmclass::checkMap | ( | ) |  [protected] | 
        
| 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().

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


| virtual void lmclass::dictionary_incflag | ( | const bool | flag | ) |  [inline, virtual] | 
        
Reimplemented from lmtable.
Definition at line 90 of file lmclass.h.
References dictionary::incflag().

| dictionary* lmclass::getDict | ( | ) |  const [inline, virtual] | 
        
| 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().


| double lmclass::getMapScore | ( | int | wcode | ) |  [inline, protected] | 
        
Definition at line 52 of file lmclass.h.
References getDict(), and dictionary::oovcode().
Referenced by lprob().


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

| void lmclass::loadMap | ( | std::istream & | inp | ) |  [protected] | 
        
| 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.

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


Definition at line 224 of file lmclass.cpp.
References getMap(), ngram::pushc(), ngram::size, VERBOSE, and ngram::wordp().
Referenced by lprob().


 1.5.9