redpony / cdec

Decoder, aligner, and model optimizer for statistical machine translation and other structured prediction models based on (mostly) context-free formalisms
http://cdec-decoder.org/
Apache License 2.0
183 stars 77 forks source link

Unary rules are broken in some cases #41

Open redpony opened 10 years ago

redpony commented 10 years ago

The parser does not always apply unary rules in the right order (in particular, when rules are loaded from multiple grammars). This can cause parse failures and missing derivations.

Example:

foo

foo.scfg: [Y] ||| foo ||| foo ||| F=1 [X] ||| [Y] ||| [1] ||| F=1

Will fail, where as foo.scfg: [X] ||| foo ||| foo ||| F=1

will succeed.