diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-29 17:19:18 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-29 17:19:18 +0200 |
commit | 1c0b252dfa0169eef0a4bdb7442d433b2bf8c1c7 (patch) | |
tree | ead6df22bd9dccb6566341e12af6ec4c46b27631 /decoder/scfg_translator.cc | |
parent | 70585a59a738d0148ed2da90252050f4d86f4a22 (diff) |
reverted changes in upstream
Diffstat (limited to 'decoder/scfg_translator.cc')
-rw-r--r-- | decoder/scfg_translator.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/decoder/scfg_translator.cc b/decoder/scfg_translator.cc index 646d67fa..15abb600 100644 --- a/decoder/scfg_translator.cc +++ b/decoder/scfg_translator.cc @@ -107,15 +107,15 @@ struct SCFGTranslatorImpl { bool operator()(const GrammarPtr& x) const { return x->GetGrammarName() == name_; } const string name_; }; void SetSentenceGrammarFromString(const std::string& grammar_str) { - assert( grammar_str != "" ); + assert(grammar_str != ""); if (!SILENT) cerr << "Setting sentence grammar" << endl; usingSentenceGrammar = true; - istringstream in( grammar_str ); - TextGrammar* sent_grammar = new TextGrammar( &in ); - sent_grammar->SetMaxSpan( max_span_limit ); - sent_grammar->SetGrammarName( "__psg" ); - grammars.erase ( remove_if(grammars.begin(), grammars.end(), NameEquals("__psg")), grammars.end() ); - grammars.push_back( GrammarPtr(sent_grammar) ); + istringstream in(grammar_str); + TextGrammar* sent_grammar = new TextGrammar(&in); + sent_grammar->SetMaxSpan(max_span_limit); + sent_grammar->SetGrammarName("__psg"); + grammars.erase(remove_if(grammars.begin(), grammars.end(), NameEquals("__psg")), grammars.end()); + grammars.push_back(GrammarPtr(sent_grammar)); } bool Translate(const string& input, |