summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-03-16 20:30:37 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2011-03-16 20:30:37 -0400
commitc5ad43f97228f36d66a2746ef8aeaf3837fe0293 (patch)
tree88481e1d8d7a41a6d579378b74ad989de982c9a6
parent1fd0d2e5cde362fec6dc08c919185a041eeee575 (diff)
possible mert bug with rules with alignments
-rw-r--r--decoder/trule.cc4
1 files changed, 3 insertions, 1 deletions
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;