diff options
author | Chris Dyer <redpony@gmail.com> | 2014-04-25 23:45:32 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-04-25 23:45:32 -0400 |
commit | d033a045aa46ff876ad2c9f6929e2095b2481cdf (patch) | |
tree | bb693517c49960220de449fa7828b28746514e2e /decoder/decoder.cc | |
parent | 18a1d98f5bd60ea195a6c3aaf8feb740da752f7e (diff) |
check for non-rescorable hypergraphs
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r-- | decoder/decoder.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc index 354ea2d9..41f36822 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -755,6 +755,11 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { if (!SILENT) cerr << " *** NODES NOT UNIQUELY IDENTIFIED ***\n"; } + if (!forest.ArePreGoalEdgesArity1()) { + cerr << "Pre-goal edges are not arity-1. The decoder requires this.\n"; + abort(); + } + const bool show_tree_structure=conf.count("show_tree_structure"); if (!SILENT) forest_stats(forest," Init. forest",show_tree_structure,oracle.show_derivation); if (conf.count("show_expected_length")) { |