summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-09-17 22:42:19 +0100
committerChris Dyer <cdyer@cs.cmu.edu>2011-09-17 22:42:19 +0100
commit388081290e99fdd6eacc9d761ebfdea69647fa72 (patch)
treeec7d251d0cb915d6f7f78870f67056319ffb1bfb
parent5d7ac6050aab3eac5121a2168fe9bd81453d118a (diff)
add target side for sss features
-rw-r--r--decoder/ff_source_syntax.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/decoder/ff_source_syntax.cc b/decoder/ff_source_syntax.cc
index fc341bb0..035132b4 100644
--- a/decoder/ff_source_syntax.cc
+++ b/decoder/ff_source_syntax.cc
@@ -181,6 +181,15 @@ struct SourceSpanSizeFeaturesImpl {
os << TD::Convert(fj);
}
}
+ os << ':';
+ for (unsigned k = 0; k < rule.e_.size(); ++k) {
+ const int ei = rule.e_[k];
+ if (k > 0) os << '_';
+ if (ei <= 0)
+ os << '[' << (1-ei) << ']';
+ else
+ os << TD::Convert(ei);
+ }
fid = FD::Convert(os.str());
}
if (fid > 0)