HFST: Better Cola Machine Script

For more information, see HfstBetterColaMachine.

echo "[?]" | hfst-regexp2fst -f $FORMAT > Solution

for i in '[ D -> N^2, Q -> N^5 ]' \
         'N^5/\N @-> ...  "[COLA]"' \
         'N -> 0 || _ $"[COLA]"' \
         'N^2/\N @-> ...  D' \
         'N -> 0 || _ $D'; do
  echo $i | hfst-regexp2fst -f $FORMAT | hfst-compose -1 Solution > TMP;
  mv TMP Solution;
done

hfst-minimize Solution > BetterColaMachine


-- ErikAxelson - 2011-10-20