RemoveSomeInputSymbolsMapper< Arc, I > Class Template Reference

#include <factor-inl.h>

Collaboration diagram for RemoveSomeInputSymbolsMapper< Arc, I >:

Public Member Functions

Arc operator() (const Arc &arc_in)
 
MapFinalAction FinalAction ()
 
MapSymbolsAction InputSymbolsAction ()
 
MapSymbolsAction OutputSymbolsAction ()
 
uint64 Properties (uint64 props) const
 
 RemoveSomeInputSymbolsMapper (const std::vector< I > &to_remove)
 

Private Attributes

kaldi::ConstIntegerSet< I > to_remove_set_
 

Detailed Description

template<class Arc, class I>
class fst::RemoveSomeInputSymbolsMapper< Arc, I >

Definition at line 223 of file factor-inl.h.

Constructor & Destructor Documentation

◆ RemoveSomeInputSymbolsMapper()

RemoveSomeInputSymbolsMapper ( const std::vector< I > &  to_remove)
inline

Definition at line 239 of file factor-inl.h.

References KALDI_ASSERT_IS_INTEGER_TYPE, and RemoveSomeInputSymbolsMapper< Arc, I >::to_remove_set_.

239  :
240  to_remove_set_(to_remove) {
242  assert(to_remove_set_.count(0) == 0); // makes no sense to remove epsilon.
243  }
#define KALDI_ASSERT_IS_INTEGER_TYPE(I)
Definition: kaldi-utils.h:133
kaldi::ConstIntegerSet< I > to_remove_set_
Definition: factor-inl.h:245

Member Function Documentation

◆ FinalAction()

MapFinalAction FinalAction ( )
inline

Definition at line 230 of file factor-inl.h.

230 { return MAP_NO_SUPERFINAL; }

◆ InputSymbolsAction()

MapSymbolsAction InputSymbolsAction ( )
inline

Definition at line 231 of file factor-inl.h.

231 { return MAP_CLEAR_SYMBOLS; }

◆ operator()()

Arc operator() ( const Arc &  arc_in)
inline

Definition at line 225 of file factor-inl.h.

References RemoveSomeInputSymbolsMapper< Arc, I >::to_remove_set_.

225  {
226  Arc ans = arc_in;
227  if (to_remove_set_.count(ans.ilabel) != 0) ans.ilabel = 0; // remove this symbol
228  return ans;
229  }
kaldi::ConstIntegerSet< I > to_remove_set_
Definition: factor-inl.h:245

◆ OutputSymbolsAction()

MapSymbolsAction OutputSymbolsAction ( )
inline

Definition at line 232 of file factor-inl.h.

232 { return MAP_COPY_SYMBOLS; }

◆ Properties()

uint64 Properties ( uint64  props) const
inline

Definition at line 233 of file factor-inl.h.

233  {
234  // remove the following as we don't know now if any of them are true.
235  uint64 to_remove = kAcceptor|kNotAcceptor|kIDeterministic|kNonIDeterministic|
236  kNoEpsilons|kNoIEpsilons|kILabelSorted|kNotILabelSorted;
237  return props & ~to_remove;
238  }

Member Data Documentation

◆ to_remove_set_


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