Author Archives: Eliza Weaver

fstintersect

fstintersect computes the intersection of two FSAs. An intersection is the same as in math: the intersection of A and B is the set of all inputs,outputs of FSA A that also occur in FSA B.

for example,

fstprint a.fst

a

0   1   1   1

1   2   2    2

1   3   3   3

2   4  0   0

3   4   0   0

4

fstprint b.fs

tb

0   1   1   1

1   2   2   2

2

fstintersect a.fst b.fst | fstprint

final

0   1   1   1

1   2    2   2

2  3    0   0

3