SFst is a library for normalizing, sampling, combining, and approximating stochastic (or probabilistic) finite-state transducers. These are weighted finite-state transducers, represented in OpenFst library format, that have the following two properties:
For example, an n-gram model produced by the OpenGrm NGram Library is a stochastic FST^{2} but many other topologies are possible.
^{1}Computation is done internally assuming the weights are negative log probabilities using Log64Weight. Conversion from the input weight type is done using a WeightConvert
functor, pre-defined for common weight types like TropicalWeight
and LogWeight
.
^{2}Provided the phi_label
is specified to match the backoff label, typically 0, of the n-gram model.