From c5ad43f97228f36d66a2746ef8aeaf3837fe0293 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Wed, 16 Mar 2011 20:30:37 -0400 Subject: possible mert bug with rules with alignments --- decoder/trule.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/decoder/trule.cc b/decoder/trule.cc index 9820e6d5..fda62741 100644 --- a/decoder/trule.cc +++ b/decoder/trule.cc @@ -145,7 +145,9 @@ bool TRule::ReadFromString(const string& line, bool strict, bool mono) { getline(is, ss); //cerr << "L: " << ss << endl; int start = 0; - const int len = ss.size(); + int len = ss.size(); + const size_t ppos = ss.find(" |||"); + if (ppos != string::npos) { len = ppos; } while (start < len) { while(start < len && (ss[start] == ' ' || ss[start] == ';')) ++start; -- cgit v1.2.3