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 state s, returning a number N such that 0 <= N <= fst.num_trs(s). If N is fst.num_trs(s), then the final weight is selected; otherwise the N-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.