Cambridge SMT System
ucam::hifst::LoadSparseWeightsTask< DataT > Class Template Reference

#include <task.loadsparseweightflowerfst.hpp>

Inheritance diagram for ucam::hifst::LoadSparseWeightsTask< DataT >:
Collaboration diagram for ucam::hifst::LoadSparseWeightsTask< DataT >:

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)
 
TaskInterfaceoperator() (TaskInterface *t)
 
TaskInterfaceappendTask (TaskInterface *t)
 Appends a task class. If there is no task, append here, otherwise delegate in next task. More...
 
TaskInterfacegetTask ()
 Return appended task. More...
 
TaskInterfacenext ()
 

Additional Inherited Members

- Protected Attributes inherited from ucam::hifst::LoadSparseWeightFlowerLatticeTask< DataT >
fst::VectorFst< TupleArc32flowerlattice_
 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::RegistryPOrg_
 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...
 

Detailed Description

template<class DataT>
class ucam::hifst::LoadSparseWeightsTask< DataT >

Definition at line 238 of file task.loadsparseweightflowerfst.hpp.

Constructor & Destructor Documentation

template<class DataT>
ucam::hifst::LoadSparseWeightsTask< DataT >::LoadSparseWeightsTask ( const ucam::util::RegistryPO rg,
const unsigned  offset = 1,
const std::string &  alignmentlattices = HifstConstants::kRulesToWeightsLoadalilats,
const std::string &  grammarloadkey = HifstConstants::kRulesToWeightsLoadGrammar 
)
inline

Definition at line 243 of file task.loadsparseweightflowerfst.hpp.

Member Function Documentation

template<class DataT>
virtual void ucam::hifst::LoadSparseWeightsTask< DataT >::closeStructure ( )
inlinevirtual
template<class DataT>
virtual void ucam::hifst::LoadSparseWeightsTask< DataT >::fillStructure ( unsigned  label,
TupleArc32::Weight const &  vtcost 
)
inlinevirtual
template<class DataT>
virtual void ucam::hifst::LoadSparseWeightsTask< DataT >::gatherRuleIds ( unordered_set< unsigned > &  idxrules,
bool  filterbyalilats,
ucam::util::IntegerPatternAddress alilats,
ucam::util::RegistryPO const &  rg 
)
inlinevirtual
template<class DataT>
virtual void ucam::hifst::LoadSparseWeightsTask< DataT >::initStructure ( )
inlinevirtual
template<class DataT>
bool ucam::hifst::LoadSparseWeightsTask< DataT >::run ( DataT &  d)
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.

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: