CompactLatticeToKwsProductFstMapper Class Reference

Public Types

typedef CompactLatticeArc FromArc
 
typedef CompactLatticeWeight FromWeight
 
typedef KwsProductArc ToArc
 
typedef KwsProductWeight ToWeight
 

Public Member Functions

 CompactLatticeToKwsProductFstMapper ()
 
ToArc operator() (const FromArc &arc) const
 
fst::MapFinalAction FinalAction () const
 
fst::MapSymbolsAction InputSymbolsAction () const
 
fst::MapSymbolsAction OutputSymbolsAction () const
 
uint64 Properties (uint64 props) const
 

Detailed Description

Definition at line 120 of file kws-functions.cc.

Member Typedef Documentation

◆ FromArc

Definition at line 122 of file kws-functions.cc.

◆ FromWeight

Definition at line 123 of file kws-functions.cc.

◆ ToArc

Definition at line 124 of file kws-functions.cc.

◆ ToWeight

Definition at line 125 of file kws-functions.cc.

Constructor & Destructor Documentation

◆ CompactLatticeToKwsProductFstMapper()

Definition at line 127 of file kws-functions.cc.

127 {}

Member Function Documentation

◆ FinalAction()

fst::MapFinalAction FinalAction ( ) const
inline

Definition at line 142 of file kws-functions.cc.

142  {
143  return fst::MAP_NO_SUPERFINAL;
144  }

◆ InputSymbolsAction()

fst::MapSymbolsAction InputSymbolsAction ( ) const
inline

Definition at line 146 of file kws-functions.cc.

146  {
147  return fst::MAP_COPY_SYMBOLS;
148  }

◆ operator()()

ToArc operator() ( const FromArc arc) const
inline

Definition at line 129 of file kws-functions.cc.

References LatticeWeightTpl< BaseFloat >::Zero().

129  {
130  return ToArc(arc.ilabel,
131  arc.olabel,
132  (arc.weight == FromWeight::Zero() ?
133  ToWeight::Zero() :
134  ToWeight(arc.weight.Weight().Value1()
135  +arc.weight.Weight().Value2(),
136  (arc.weight.Weight() == LatticeWeight::Zero() ?
137  StdXStdprimeWeight::Zero() :
138  StdXStdprimeWeight::One()))),
139  arc.nextstate);
140  }
fst::ProductWeight< TropicalWeight, ArcticWeight > StdXStdprimeWeight
Definition: kaldi-kws.h:39
static const LatticeWeightTpl Zero()
static const CompactLatticeWeightTpl< WeightType, IntType > Zero()

◆ OutputSymbolsAction()

fst::MapSymbolsAction OutputSymbolsAction ( ) const
inline

Definition at line 150 of file kws-functions.cc.

150  {
151  return fst::MAP_COPY_SYMBOLS;
152  }

◆ Properties()

uint64 Properties ( uint64  props) const
inline

Definition at line 154 of file kws-functions.cc.

154  {
155  return props;
156  }

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