Cambridge SMT System
ucam::fsttools::TopoFeaturesHelper< ActionT > Struct Template Reference

A wrapper that runs maps labels to topological features, runs an "action" (sequence of standard fst operations defined as a policy per ActionT), and then expands the resulting lattice and moves topological features to allow for a 1-1 reverse mapping from features to output labels on the same arcs. More...

#include <fstutils.topofeatures.hpp>

Public Member Functions

 TopoFeaturesHelper (bool exitOnFailure)
 
void operator() (fst::VectorFst< fst::StdArc > *fst)
 

Public Attributes

ActionT action_
 
bool exitOnFailure_
 
bool reverseFirst_
 

Detailed Description

template<class ActionT>
struct ucam::fsttools::TopoFeaturesHelper< ActionT >

A wrapper that runs maps labels to topological features, runs an "action" (sequence of standard fst operations defined as a policy per ActionT), and then expands the resulting lattice and moves topological features to allow for a 1-1 reverse mapping from features to output labels on the same arcs.

Remarks
Note that it protects epsilons (ie relabel). In particular, this is important for ExpandPathsWithTopologicalWeights

Definition at line 732 of file fstutils.topofeatures.hpp.

Constructor & Destructor Documentation

template<class ActionT>
ucam::fsttools::TopoFeaturesHelper< ActionT >::TopoFeaturesHelper ( bool  exitOnFailure)
inlineexplicit

Definition at line 736 of file fstutils.topofeatures.hpp.

Member Function Documentation

template<class ActionT>
void ucam::fsttools::TopoFeaturesHelper< ActionT >::operator() ( fst::VectorFst< fst::StdArc > *  fst)
inline

Definition at line 742 of file fstutils.topofeatures.hpp.

Here is the call graph for this function:

Member Data Documentation

template<class ActionT>
ActionT ucam::fsttools::TopoFeaturesHelper< ActionT >::action_

Definition at line 733 of file fstutils.topofeatures.hpp.

template<class ActionT>
bool ucam::fsttools::TopoFeaturesHelper< ActionT >::exitOnFailure_

Definition at line 734 of file fstutils.topofeatures.hpp.

template<class ActionT>
bool ucam::fsttools::TopoFeaturesHelper< ActionT >::reverseFirst_

Definition at line 735 of file fstutils.topofeatures.hpp.


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