Skip to content

Instantly share code, notes, and snippets.

@vznvzn
Created November 4, 2018 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vznvzn/80805fa1718ef23cb19536b4517454ae to your computer and use it in GitHub Desktop.
Save vznvzn/80805fa1718ef23cb19536b4517454ae to your computer and use it in GitHub Desktop.
@echo off
fstcompile fsm3nb.txt fsm.fst
fstinfo fsm.fst | findstr /c:"# of states"
fstarcsort --sort_type=ilabel fsm.fst fsmb.fst
fstcompose fsm.fst fsmb.fst fsm2.fst
fstinfo fsm2.fst | findstr /c:"# of states"
fstdeterminize fsm2.fst fsm2b.fst
fstminimize fsm2b.fst fsm2c.fst
fstepsnormalize fsm2c.fst fsm2d.fst
fstinfo fsm2d.fst | findstr /c:"# of states"
fstprint fsm2d.fst fsm2d.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment