Module rustfst::algorithms::randgen
source · Expand description
Functions to randomly generate paths through an Fst. A static and a delayed version are available.
Structs§
- Configuration struct for random path generation.
- Delayed Fst sampling Fst paths through the input Fst.
- Randomly selects a transition using the uniform distribution.
Traits§
TrSelector
implementors are used to select a random transition given an Fst states
, returning a numberN
such that 0 <=N
<=fst.num_trs(s)
. IfN
isfst.num_trs(s)
, then the final weight is selected; otherwise theN
-th transition is selected. It is assumed these are not applied to any state which is neither final nor has any arcs leaving it.
Functions§
- Randomly generate a path through an Fst with the uniform distribution over the transitions.
- Randomly generate paths through an Fst; execution controlled by RandGenConfig.