  Terminal-Aware Synchronous Context-Free Grammar Binarizer

  Licheng Fang <lfang@cs.rochester.edu>

Before running the binarizer
  1. Python 3.1 needed.
  2. Change the first line of "scfg_binarize.py" to "#!<PATH_TO_PYTHON3.1>"

To run the binarizer
  $ cat <your_grammar_file> | ./scfg_binarize.py -c "b e" -f <freq_file> > <output_grammar_file>

  - "b e" is the cost function used in binarization. Other combinations can be
    used. Run "./scfg_binarizer.py -h" to see help message for option details.
  - <freq_file> is for computing source word frequencies

Examples
  Check the test dir for an example.

Grammar file format
  e.g.
  [A] ||| e1 [B,1] [B,2] ||| c1 [B,2] [B,1] ||| 0.9
  ___     ___________       _______________    _____

  lhs     target side        source side       prob
