Class ScaleDeterministicOnDemandFst takes another DeterministicOnDemandFst and scales the weights (like applying a language-model scale). More...
#include <deterministic-fst.h>
Public Types | |
typedef StdArc::Weight | Weight |
typedef StdArc::StateId | StateId |
typedef StdArc::Label | Label |
Public Types inherited from DeterministicOnDemandFst< StdArc > | |
typedef StdArc ::StateId | StateId |
typedef StdArc ::Weight | Weight |
typedef StdArc ::Label | Label |
Public Member Functions | |
ScaleDeterministicOnDemandFst (float scale, DeterministicOnDemandFst< StdArc > *det_fst) | |
StateId | Start () |
Weight | Final (StateId s) |
bool | GetArc (StateId s, Label ilabel, StdArc *oarc) |
Public Member Functions inherited from DeterministicOnDemandFst< StdArc > | |
virtual Weight | Final (StateId s)=0 |
virtual bool | GetArc (StateId s, Label ilabel, StdArc *oarc)=0 |
Note: ilabel must not be epsilon. More... | |
virtual | ~DeterministicOnDemandFst () |
Private Attributes | |
float | scale_ |
DeterministicOnDemandFst< StdArc > & | det_fst_ |
Class ScaleDeterministicOnDemandFst takes another DeterministicOnDemandFst and scales the weights (like applying a language-model scale).
For instance, to subtract existing LM scores from a lattice you could use this with a negative weight; and to interpolate LMs you can also use this with weights less than one.
It's specialized for StdArc because there is no generic way to scale weights.
Definition at line 129 of file deterministic-fst.h.
typedef StdArc::Label Label |
Definition at line 133 of file deterministic-fst.h.
typedef StdArc::StateId StateId |
Definition at line 132 of file deterministic-fst.h.
typedef StdArc::Weight Weight |
Definition at line 131 of file deterministic-fst.h.
|
inline |
Definition at line 136 of file deterministic-fst.h.
Definition at line 142 of file deterministic-fst.h.
Definition at line 149 of file deterministic-fst.h.
|
inlinevirtual |
Implements DeterministicOnDemandFst< StdArc >.
Definition at line 140 of file deterministic-fst.h.
|
private |
Definition at line 160 of file deterministic-fst.h.
|
private |
Definition at line 159 of file deterministic-fst.h.