diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-07-20 00:46:10 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-07-20 00:46:10 -0400 |
commit | 09d085e16f31b36b1177b313ee54414eb29d9082 (patch) | |
tree | 9b718b8129790860052ac35524b66b1645df847c /dtrain/dtrain.cc | |
parent | 30c3f2b7186e6dc19acb8856b280b8dd97d1f679 (diff) |
enable programmatic setting of grammar objects, cleanup of grammar handling
Diffstat (limited to 'dtrain/dtrain.cc')
-rw-r--r-- | dtrain/dtrain.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dtrain/dtrain.cc b/dtrain/dtrain.cc index b3e62914..b7a4bb6f 100644 --- a/dtrain/dtrain.cc +++ b/dtrain/dtrain.cc @@ -364,7 +364,7 @@ main(int argc, char** argv) boost::replace_all(in, "\t", "\n"); in += "\n"; grammar_buf_out << in << DTRAIN_GRAMMAR_DELIM << " " << in_split[0] << endl; - decoder.SetSentenceGrammarFromString(in); + decoder.AddSupplementalGrammarFromString(in); src_str_buf.push_back(in_split[1]); // decode observer->SetRef(ref_ids); @@ -378,7 +378,7 @@ main(int argc, char** argv) if (boost::starts_with(rule, DTRAIN_GRAMMAR_DELIM)) break; grammar_str += rule + "\n"; } - decoder.SetSentenceGrammarFromString(grammar_str); + decoder.AddSupplementalGrammarFromString(grammar_str); // decode observer->SetRef(ref_ids_buf[ii]); decoder.Decode(src_str_buf[ii], observer); |