Module encode

Source
Expand description

Functions to encode FSTs as FSAs and vice versa.

Structs§

EncodeTable

Enums§

EncodeType

Functions§

decode
The decode operation takes as input an encoded FST and the corresponding EncodeTable object and reverts the encoding.
encode
The encode operation allows the representation of a weighted transducer as a weighted automaton, an unweighted transducer or an unweighted automaton by considering the pair (input label, output), the pair (input label, weight) or the triple (input label, output label, weight) as a single label depending on the value of the encode flags: encode_labels and encode_weights.