From ac224d3f0c63760ad33fa04719d26d3a3e42495c Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 16 Dec 2013 23:49:58 -0500 Subject: better parsing errors, thx to nschneid, also increase limits on number of features --- decoder/grammar.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'decoder/grammar.cc') diff --git a/decoder/grammar.cc b/decoder/grammar.cc index 160d00e6..439e448d 100644 --- a/decoder/grammar.cc +++ b/decoder/grammar.cc @@ -121,11 +121,11 @@ static void AddRuleHelper(const TRulePtr& new_rule, const unsigned int ctf_level void TextGrammar::ReadFromFile(const string& filename) { ReadFile in(filename); - ReadFromStream(in.stream()); + RuleLexer::ReadRules(in.stream(), &AddRuleHelper, filename, this); } void TextGrammar::ReadFromStream(istream* in) { - RuleLexer::ReadRules(in, &AddRuleHelper, this); + RuleLexer::ReadRules(in, &AddRuleHelper, "UNKNOWN", this); } bool TextGrammar::HasRuleForSpan(int /* i */, int /* j */, int distance) const { -- cgit v1.2.3