summaryrefslogtreecommitdiff
path: root/decoder/trule.cc
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
commit95e50962fe307b930e835513e4d9998df91426a4 (patch)
tree1bdf6eb0f4c73f76b1e4e2c20bbf9af3af007f27 /decoder/trule.cc
parent003d5293b1647cfdf38af3c622adaa5db74a1409 (diff)
possible mert bug with rules with alignments
Diffstat (limited to 'decoder/trule.cc')
-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;