Cambridge SMT System
fst::WordPenaltyMapper< Arc > Class Template Reference

templated Mapper that inserts a word penalty over an FST, skipping user defined epsilon arcs. More...

#include <fstutils.mapper.hpp>

Public Member Functions

 WordPenaltyMapper (typename Arc::Weight wp, unordered_set< typename Arc::Label > epsilons)
 Constructor. More...
 
Arc operator() (const Arc &arc) const
 Takes arc as input parameter and returns modified arc. More...
 
MapSymbolsAction InputSymbolsAction () const
 
MapSymbolsAction OutputSymbolsAction () const
 
MapFinalAction FinalAction () const
 
uint Properties (uint props) const
 

Public Attributes

Arc::Weight wp_
 Specialized functor that modifies arc weights. More...
 
unordered_set< typename Arc::Label > epsilons_
 

Detailed Description

template<class Arc>
class fst::WordPenaltyMapper< Arc >

templated Mapper that inserts a word penalty over an FST, skipping user defined epsilon arcs.

Definition at line 160 of file fstutils.mapper.hpp.

Constructor & Destructor Documentation

template<class Arc >
fst::WordPenaltyMapper< Arc >::WordPenaltyMapper ( typename Arc::Weight  wp,
unordered_set< typename Arc::Label >  epsilons 
)
inlineexplicit

Constructor.

Definition at line 163 of file fstutils.mapper.hpp.

Member Function Documentation

template<class Arc >
MapFinalAction fst::WordPenaltyMapper< Arc >::FinalAction ( ) const
inline

Definition at line 182 of file fstutils.mapper.hpp.

template<class Arc >
MapSymbolsAction fst::WordPenaltyMapper< Arc >::InputSymbolsAction ( ) const
inline

Definition at line 176 of file fstutils.mapper.hpp.

template<class Arc >
Arc fst::WordPenaltyMapper< Arc >::operator() ( const Arc &  arc) const
inline

Takes arc as input parameter and returns modified arc.

Definition at line 170 of file fstutils.mapper.hpp.

Here is the call graph for this function:

template<class Arc >
MapSymbolsAction fst::WordPenaltyMapper< Arc >::OutputSymbolsAction ( ) const
inline

Definition at line 179 of file fstutils.mapper.hpp.

template<class Arc >
uint fst::WordPenaltyMapper< Arc >::Properties ( uint  props) const
inline

Definition at line 185 of file fstutils.mapper.hpp.

Member Data Documentation

template<class Arc >
unordered_set<typename Arc::Label> fst::WordPenaltyMapper< Arc >::epsilons_

Definition at line 191 of file fstutils.mapper.hpp.

template<class Arc >
Arc::Weight fst::WordPenaltyMapper< Arc >::wp_

Specialized functor that modifies arc weights.

Definition at line 190 of file fstutils.mapper.hpp.


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