Cambridge SMT System
|
#include <task.loadsparseweightflowerfst.hpp>
Public Member Functions | |
LoadSparseWeightsTask (const ucam::util::RegistryPO &rg, const unsigned offset=1, const std::string &alignmentlattices=HifstConstants::kRulesToWeightsLoadalilats, const std::string &grammarloadkey=HifstConstants::kRulesToWeightsLoadGrammar) | |
bool | run (DataT &d) |
Inherited method from ucam::util::TaskInterface. Loads the flower lattice into the data object. More... | |
virtual void | initStructure () |
virtual void | fillStructure (unsigned label, TupleArc32::Weight const &vtcost) |
virtual void | closeStructure () |
virtual void | gatherRuleIds (unordered_set< unsigned > &idxrules, bool filterbyalilats, ucam::util::IntegerPatternAddress &alilats, ucam::util::RegistryPO const &rg) |
Public Member Functions inherited from ucam::hifst::LoadSparseWeightFlowerLatticeTask< DataT > | |
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 | 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) |
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 () |
Additional Inherited Members | |
Protected Attributes inherited from ucam::hifst::LoadSparseWeightFlowerLatticeTask< DataT > | |
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... | |
Definition at line 238 of file task.loadsparseweightflowerfst.hpp.
|
inline |
Definition at line 243 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Reimplemented from ucam::hifst::LoadSparseWeightFlowerLatticeTask< DataT >.
Definition at line 264 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Reimplemented from ucam::hifst::LoadSparseWeightFlowerLatticeTask< DataT >.
Definition at line 257 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Reimplemented from ucam::hifst::LoadSparseWeightFlowerLatticeTask< DataT >.
Definition at line 266 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Reimplemented from ucam::hifst::LoadSparseWeightFlowerLatticeTask< DataT >.
Definition at line 255 of file task.loadsparseweightflowerfst.hpp.
|
inlinevirtual |
Inherited method from ucam::util::TaskInterface. Loads the flower lattice into the data object.
Reimplemented from ucam::hifst::LoadSparseWeightFlowerLatticeTask< DataT >.
Definition at line 250 of file task.loadsparseweightflowerfst.hpp.