diff options
author | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2014-02-23 02:13:32 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2014-02-23 02:13:32 -0500 |
commit | 3ec30b72f47e063d94648a9823653e6ec3e17401 (patch) | |
tree | a2cc61e43aff170543ea197250a5137a86ca5598 /decoder/decoder.cc | |
parent | 77b37114061a17edf55dc2abadf484182b04aa8e (diff) |
fix rule emission behavior
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r-- | decoder/decoder.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc index e02c7730..f8104c5e 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -662,11 +662,6 @@ DecoderImpl::DecoderImpl(po::variables_map& conf, int argc, char** argv, istream oracle.show_derivation=conf.count("show_derivations"); remove_intersected_rule_annotations = conf.count("remove_intersected_rule_annotations"); - if (conf.count("extract_rules")) { - stringstream ss; - ss << sent_id; - extract_file.reset(new WriteFile(str("extract_rules",conf)+"/"+ss.str())); - } combine_size = conf["combine_size"].as<int>(); if (combine_size < 1) combine_size = 1; sent_id = -1; @@ -720,6 +715,11 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { } cerr << " id = " << sent_id << endl; } + if (conf.count("extract_rules")) { + stringstream ss; + ss << sent_id << ".gz"; + extract_file.reset(new WriteFile(str("extract_rules",conf)+"/"+ss.str())); + } string to_translate; Lattice ref; ParseTranslatorInputLattice(buf, &to_translate, &ref); |