Cambridge SMT System
|
Language model loader task, loads a language model wrapping it in a class to provide. More...
#include <task.applylm.hpp>
Public Member Functions | |
ApplyLanguageModelTask (const ucam::util::RegistryPO &rg, const std::string &lmkey=HifstConstants::kLmLoad, const std::string &latticeloadkey="lm.lattice.load", const std::string &latticestorekey="lm.lattice.store", bool deletelmscores=false) | |
Constructor with ucam::util::RegistryPO object. More... | |
void | initializeLanguageModelHandlers (Data &d) |
Initializes appropriate templated handlers for kenlm language models. More... | |
bool | run (Data &d) |
Method inherited from ucam::util::TaskInterface. Loads the language model and stores in lm data structure. More... | |
~ApplyLanguageModelTask () | |
Public Member Functions inherited from ucam::util::TaskInterface< Data > | |
TaskInterface () | |
Constructor. More... | |
virtual | ~TaskInterface () |
bool | chainrun (Data &d) |
Implements chain of responsability. Calls run method and, if there is another task, call its run method too. More... | |
bool | operator() (Data &d) |
TaskInterface & | appendTask (TaskInterface *t) |
Appends a task class. If there is no task, append here, otherwise delegate in next task. More... | |
TaskInterface & | operator() (TaskInterface *t) |
TaskInterface * | getTask () |
Return appended task. More... | |
TaskInterface * | next () |
Language model loader task, loads a language model wrapping it in a class to provide.
Definition at line 36 of file task.applylm.hpp.
|
inline |
Constructor with ucam::util::RegistryPO object.
Definition at line 58 of file task.applylm.hpp.
|
inline |
Definition at line 135 of file task.applylm.hpp.
|
inline |
Initializes appropriate templated handlers for kenlm language models.
We want the language model to ignore these guys:
Definition at line 75 of file task.applylm.hpp.
|
inlinevirtual |
Method inherited from ucam::util::TaskInterface. Loads the language model and stores in lm data structure.
&d | data structure in which the null filter is to be stored. |
Implements ucam::util::TaskInterface< Data >.
Definition at line 101 of file task.applylm.hpp.