Author Archives: Shiven

fstreverse

The operation fstreverse produces an fst that will contain all of the reverse strings of the input fst. If fst A transduces string x to y with weight a, then the reverse of A transduces the reverse of x to the reverse of y with weight a.Reverse(). Typically, a = a.Reverse().

========================
Initial automaton, L.fst
fstprint –osymbols=words.txt –isymbols=words.txt L.fst
0 1 a a
1 2 b b
1 3 c c
2 4 <eps> <eps>
3 4 <eps> <eps>
4

L
========================
Run fstreverse on L.fst to produce L2.fst
fstreverse L.fst L2.fst
fstprint –osymbols=words.txt –isymbols=words.txt L2.fst
0 5 <eps> <eps>
1
2 1 a a
3 2 b b
4 2 c c
5 3 <eps> <eps>
5 4 <eps> <eps>

L2
========================