Cambridge SMT System
|
Implements a class that loads the grammar sparseweight flower lattice and stores a pointer on the data object. More...
#include <task.loadsparseweightflowerfst.hpp>
Public Member Functions | |
LoadSparseWeightFlowerLatticeTask (const ucam::util::RegistryPO &rg, const unsigned offset=1, const std::string &alignmentlattices="", const std::string &grammarloadkey=HifstConstants::kRuleflowerlatticeLoad, const std::string &grammarstorekey=HifstConstants::kRuleflowerlatticeStore) | |
Constructor with registry object, offset and keys. More... | |
bool | run (DataT &d) |
Inherited method from ucam::util::TaskInterface. Loads the flower lattice into the data object. More... | |
bool | directload (const std::string &filename) |
If it is an fst, load directly. More... | |
bool | checkGrammarFile (std::string const &filename) |
void | updateFilename (std::string const &filename) |
virtual void | gatherRuleIds (unordered_set< unsigned > &idxrules, bool filterbyalilats, ucam::util::IntegerPatternAddress &alilats, ucam::util::RegistryPO const &rg) |
virtual void | initStructure () |
virtual void | fillStructure (unsigned label, TupleArc32::Weight const &vtcost) |
virtual void | closeStructure () |
bool | load (const std::string &filename) |
Load flower lattice from file. More... | |
Public Member Functions inherited from ucam::util::TaskInterface< DataT > | |
TaskInterface () | |
Constructor. More... | |
virtual | ~TaskInterface () |
bool | chainrun (DataT &d) |
Implements chain of responsability. Calls run method and, if there is another task, call its run method too. More... | |
bool | operator() (DataT &d) |
TaskInterface & | operator() (TaskInterface *t) |
TaskInterface & | appendTask (TaskInterface *t) |
Appends a task class. If there is no task, append here, otherwise delegate in next task. More... | |
TaskInterface * | getTask () |
Return appended task. More... | |
TaskInterface * | next () |
Protected Attributes | |
fst::VectorFst< TupleArc32 > | flowerlattice_ |
Fst with the flower lattice itself. More... | |
std::vector< float > & | fscales_ |
sparse tuple-weight scales More... | |
ucam::util::IntegerPatternAddress | alilats_ |
Alignment lattices file names. More... | |
ucam::util::IntegerPatternAddress | grammar_ |
Grammar file name. More... | |
std::string | previousfile_ |
Previous grammar file name. More... | |
bool | filterbyalilats_ |
If true, the grammar flower lattice will be loaded only with rules that have been used in the alignment lattices. More... | |
const ucam::util::RegistryPO & | rg_ |
Registry object – contains program options. More... | |
bool | built_ |
Is the flower lattice built. More... | |
const std::string | grammarloadkey_ |
Key with access to registry object for the grammar file name. More... | |
const std::string | grammarstorekey_ |
Key to store in the data object. More... | |
const unsigned | offset_ |
Number of language models. More... | |
Implements a class that loads the grammar sparseweight flower lattice and stores a pointer on the data object.
Definition at line 31 of file task.loadsparseweightflowerfst.hpp.
|
inline |
Constructor with registry object, offset and keys.
Definition at line 68 of file task.loadsparseweightflowerfst.hpp.
|
inline |
Definition at line 111 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Reimplemented in ucam::hifst::LoadSparseWeightsTask< DataT >.
Definition at line 152 of file task.loadsparseweightflowerfst.hpp.
|
inline |
If it is an fst, load directly.
Definition at line 93 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Reimplemented in ucam::hifst::LoadSparseWeightsTask< DataT >.
Definition at line 148 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Reimplemented in ucam::hifst::LoadSparseWeightsTask< DataT >.
Definition at line 124 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Reimplemented in ucam::hifst::LoadSparseWeightsTask< DataT >.
Definition at line 142 of file task.loadsparseweightflowerfst.hpp.
|
inline |
Load flower lattice from file.
Definition at line 162 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Inherited method from ucam::util::TaskInterface. Loads the flower lattice into the data object.
Implements ucam::util::TaskInterface< DataT >.
Reimplemented in ucam::hifst::LoadSparseWeightsTask< DataT >.
Definition at line 86 of file task.loadsparseweightflowerfst.hpp.
|
inline |
Definition at line 120 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Alignment lattices file names.
Definition at line 42 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Is the flower lattice built.
Definition at line 57 of file task.loadsparseweightflowerfst.hpp.
|
protected |
If true, the grammar flower lattice will be loaded only with rules that have been used in the alignment lattices.
Definition at line 51 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Fst with the flower lattice itself.
Definition at line 36 of file task.loadsparseweightflowerfst.hpp.
|
protected |
sparse tuple-weight scales
Definition at line 39 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Grammar file name.
Definition at line 45 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Key with access to registry object for the grammar file name.
Definition at line 60 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Key to store in the data object.
Definition at line 62 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Number of language models.
Definition at line 65 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Previous grammar file name.
Definition at line 48 of file task.loadsparseweightflowerfst.hpp.
|
protected |
Registry object – contains program options.
Definition at line 54 of file task.loadsparseweightflowerfst.hpp.