Cambridge SMT System
ucam::fsttools::ApplyLanguageModelTask< Data, Arc > Class Template Reference

Language model loader task, loads a language model wrapping it in a class to provide. More...

#include <task.applylm.hpp>

Inheritance diagram for ucam::fsttools::ApplyLanguageModelTask< Data, Arc >:
Collaboration diagram for ucam::fsttools::ApplyLanguageModelTask< Data, Arc >:

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)
 
TaskInterfaceappendTask (TaskInterface *t)
 Appends a task class. If there is no task, append here, otherwise delegate in next task. More...
 
TaskInterfaceoperator() (TaskInterface *t)
 
TaskInterfacegetTask ()
 Return appended task. More...
 
TaskInterfacenext ()
 

Detailed Description

template<class Data, class Arc>
class ucam::fsttools::ApplyLanguageModelTask< Data, Arc >

Language model loader task, loads a language model wrapping it in a class to provide.

Definition at line 36 of file task.applylm.hpp.

Constructor & Destructor Documentation

template<class Data , class Arc >
ucam::fsttools::ApplyLanguageModelTask< Data, Arc >::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 
)
inline

Constructor with ucam::util::RegistryPO object.

Definition at line 58 of file task.applylm.hpp.

template<class Data , class Arc >
ucam::fsttools::ApplyLanguageModelTask< Data, Arc >::~ApplyLanguageModelTask ( )
inline

Definition at line 135 of file task.applylm.hpp.

Member Function Documentation

template<class Data , class Arc >
void ucam::fsttools::ApplyLanguageModelTask< Data, Arc >::initializeLanguageModelHandlers ( Data &  d)
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.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Data , class Arc >
bool ucam::fsttools::ApplyLanguageModelTask< Data, Arc >::run ( Data &  d)
inlinevirtual

Method inherited from ucam::util::TaskInterface. Loads the language model and stores in lm data structure.

Parameters
&ddata structure in which the null filter is to be stored.
Returns
false (does not break the chain of tasks)

Implements ucam::util::TaskInterface< Data >.

Definition at line 101 of file task.applylm.hpp.

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 file: