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

Task that dumps nbest and feature file. Templated on specific Data object and Fst Arc. More...

#include <task.dumpnbestfeatures.hpp>

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

Public Member Functions

 DumpNbestFeaturesTask (const ucam::util::RegistryPO &rg, const unsigned offset=1, const std::string &sparseweightlatticekey=HifstConstants::kSparseweightvectorlatticeStore, const std::string &wordmapkey=HifstConstants::kSparseweightvectorlatticeWordmap)
 Constructor. More...
 
bool run (Data &d)
 Dumps nbest or features from sparse tuple weight lattice in the data object d, if it exists. More...
 
void writeNbestFile (const fst::VectorFst< TupleArc32 > &vectorlattice, const std::string &filename)
 Specific method to write nbest list from the sparse vector weight lattice. More...
 
void writeFeatureFile (const fst::VectorFst< TupleArc32 > &vectorlattice, const std::string &filename)
 Specific method to dump feature file from sparse vector weight lattice. 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 ()
 

Static Public Member Functions

static DumpNbestFeaturesTaskinit (const ucam::util::RegistryPO &rg, const unsigned offset=1, const std::string &sparseweightlatticekey=HifstConstants::kSparseweightvectorlatticeStore)
 

Detailed Description

template<class Data, class Arc = fst::StdArc>
class ucam::hifst::DumpNbestFeaturesTask< Data, Arc >

Task that dumps nbest and feature file. Templated on specific Data object and Fst Arc.

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

Constructor & Destructor Documentation

template<class Data , class Arc = fst::StdArc>
ucam::hifst::DumpNbestFeaturesTask< Data, Arc >::DumpNbestFeaturesTask ( const ucam::util::RegistryPO rg,
const unsigned  offset = 1,
const std::string &  sparseweightlatticekey = HifstConstants::kSparseweightvectorlatticeStore,
const std::string &  wordmapkey = HifstConstants::kSparseweightvectorlatticeWordmap 
)
inline

Constructor.

Parameters
rgRegistryPO object containing program options
offsetNumber of language models
sparseweightlatticekeyKey to access parseweightlattice in the data object

Definition at line 69 of file task.dumpnbestfeatures.hpp.

Member Function Documentation

template<class Data , class Arc = fst::StdArc>
static DumpNbestFeaturesTask* ucam::hifst::DumpNbestFeaturesTask< Data, Arc >::init ( const ucam::util::RegistryPO rg,
const unsigned  offset = 1,
const std::string &  sparseweightlatticekey = HifstConstants::kSparseweightvectorlatticeStore 
)
inlinestatic

Static method to create and object of this task class. Parameters identical to constructor. It will return NULL no program option using this task has been defined by the program user.

Definition at line 91 of file task.dumpnbestfeatures.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Dumps nbest or features from sparse tuple weight lattice in the data object d, if it exists.

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

Definition at line 103 of file task.dumpnbestfeatures.hpp.

Here is the call graph for this function:

template<class Data , class Arc = fst::StdArc>
void ucam::hifst::DumpNbestFeaturesTask< Data, Arc >::writeFeatureFile ( const fst::VectorFst< TupleArc32 > &  vectorlattice,
const std::string &  filename 
)
inline

Specific method to dump feature file from sparse vector weight lattice.

Definition at line 159 of file task.dumpnbestfeatures.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Data , class Arc = fst::StdArc>
void ucam::hifst::DumpNbestFeaturesTask< Data, Arc >::writeNbestFile ( const fst::VectorFst< TupleArc32 > &  vectorlattice,
const std::string &  filename 
)
inline

Specific method to write nbest list from the sparse vector weight lattice.

Definition at line 123 of file task.dumpnbestfeatures.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: