Cambridge SMT System
ucam::hifst::PostProTask< Data, Arc > Class Template Reference

Task that writes translation to a text file. This translation might be recased, wordmapped and tokenized. More...

#include <task.postpro.hpp>

Inheritance diagram for ucam::hifst::PostProTask< Data, Arc >:
Collaboration diagram for ucam::hifst::PostProTask< Data, Arc >:

Public Member Functions

 PostProTask (const ucam::util::RegistryPO &rg, const std::string &inputkey=HifstConstants::kPostproInput, const std::string &wordmapkey=HifstConstants::kPostproWordmapLoad)
 Constructor with ucam::util::RegistryPO object and keys to access lattice and wordmap. More...
 
void setDetokenize (bool detok)
 Turn on/off tokenization. More...
 
bool run (Data &d)
 Writes 1-best to file. Optionally, recases, maps back to words, and detokenizes. More...
 
- 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 = fst::StdArc>
class ucam::hifst::PostProTask< Data, Arc >

Task that writes translation to a text file. This translation might be recased, wordmapped and tokenized.

Definition at line 32 of file task.postpro.hpp.

Constructor & Destructor Documentation

template<class Data, class Arc = fst::StdArc>
ucam::hifst::PostProTask< Data, Arc >::PostProTask ( const ucam::util::RegistryPO rg,
const std::string &  inputkey = HifstConstants::kPostproInput,
const std::string &  wordmapkey = HifstConstants::kPostproWordmapLoad 
)
inline

Constructor with ucam::util::RegistryPO object and keys to access lattice and wordmap.

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

Member Function Documentation

template<class Data, class Arc = fst::StdArc>
bool ucam::hifst::PostProTask< Data, Arc >::run ( Data &  d)
inlinevirtual

Writes 1-best to file. Optionally, recases, maps back to words, and detokenizes.

Parameters
&dData structure conatining d.translationlattice.

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

Definition at line 86 of file task.postpro.hpp.

Here is the call graph for this function:

template<class Data, class Arc = fst::StdArc>
void ucam::hifst::PostProTask< Data, Arc >::setDetokenize ( bool  detok)
inline

Turn on/off tokenization.

Definition at line 77 of file task.postpro.hpp.


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