Cambridge SMT System
ucam::hifst::ManualReplaceFstByArc< Arc > Class Template Reference

Creates FST replacement or not depending on conditions including program options. More...

#include <task.hifst.replacefstbyarc.hpp>

Public Member Functions

 ManualReplaceFstByArc (grammar_inversecategories_t const &vcat, unordered_set< std::string > const &replacefstbyarc, bool alignmode, std::size_t min_numstates=std::numeric_limits< std::size_t >::max())
 
 ManualReplaceFstByArc (grammar_inversecategories_t const &vcat, unordered_set< std::string > const &replacefstbyarc, unordered_set< std::string > const &replacefstbyarcexceptions, bool alignmode, std::size_t min_numstates=std::numeric_limits< std::size_t >::max())
 
fst::VectorFst< Arc > * operator() (fst::VectorFst< Arc > const &fst, Label const &hieroindex) const
 Determines whether an FST is replaceable If so (NS > minns or determined by program option hifst.replacfstbyarc), then it builds the FST replacement and returns it. Otherwise returns NULL. More...
 

Detailed Description

template<class Arc = fst::LexStdArc>
class ucam::hifst::ManualReplaceFstByArc< Arc >

Creates FST replacement or not depending on conditions including program options.

Remarks
In addition to ReplaceFstByArc, this class also considers a list of non-terminals For cell lattices associated to any of the non-terminals in this list, an FST with a pointer arc will be always generated.

Definition at line 95 of file task.hifst.replacefstbyarc.hpp.

Constructor & Destructor Documentation

template<class Arc = fst::LexStdArc>
ucam::hifst::ManualReplaceFstByArc< Arc >::ManualReplaceFstByArc ( grammar_inversecategories_t const &  vcat,
unordered_set< std::string > const &  replacefstbyarc,
bool  alignmode,
std::size_t  min_numstates = std::numeric_limits<std::size_t>::max() 
)
inline
Parameters
vcatcc - string category mapping
replacefstbyarcContains a list of non-terminals corresponding to cell lattices that must be replaced
alignmodeHifst in alignment mode or not
min_numstatesNumber of states minimum threshold

Definition at line 117 of file task.hifst.replacefstbyarc.hpp.

template<class Arc = fst::LexStdArc>
ucam::hifst::ManualReplaceFstByArc< Arc >::ManualReplaceFstByArc ( grammar_inversecategories_t const &  vcat,
unordered_set< std::string > const &  replacefstbyarc,
unordered_set< std::string > const &  replacefstbyarcexceptions,
bool  alignmode,
std::size_t  min_numstates = std::numeric_limits<std::size_t>::max() 
)
inline

Definition at line 128 of file task.hifst.replacefstbyarc.hpp.

Member Function Documentation

template<class Arc = fst::LexStdArc>
fst::VectorFst<Arc>* ucam::hifst::ManualReplaceFstByArc< Arc >::operator() ( fst::VectorFst< Arc > const &  fst,
Label const &  hieroindex 
) const
inline

Determines whether an FST is replaceable If so (NS > minns or determined by program option hifst.replacfstbyarc), then it builds the FST replacement and returns it. Otherwise returns NULL.

Parameters
fstThe fst candidate for replacing with a pointer arc
hieroindexIndex for cc,x,y in the cyk grid cell

Definition at line 149 of file task.hifst.replacefstbyarc.hpp.


The documentation for this class was generated from the following file: