Cambridge SMT System
|
Task that dumps nbest and feature file. Templated on specific Data object and Fst Arc. More...
#include <task.dumpnbestfeatures.hpp>
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) |
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 () |
Static Public Member Functions | |
static DumpNbestFeaturesTask * | init (const ucam::util::RegistryPO &rg, const unsigned offset=1, const std::string &sparseweightlatticekey=HifstConstants::kSparseweightvectorlatticeStore) |
Task that dumps nbest and feature file. Templated on specific Data object and Fst Arc.
Definition at line 32 of file task.dumpnbestfeatures.hpp.
|
inline |
Constructor.
rg | RegistryPO object containing program options |
offset | Number of language models |
sparseweightlatticekey | Key to access parseweightlattice in the data object |
Definition at line 69 of file task.dumpnbestfeatures.hpp.
|
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.
|
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.
|
inline |
Specific method to dump feature file from sparse vector weight lattice.
Definition at line 159 of file task.dumpnbestfeatures.hpp.
|
inline |
Specific method to write nbest list from the sparse vector weight lattice.
Definition at line 123 of file task.dumpnbestfeatures.hpp.