From 4b619c0ca5b8c521c6fb4c3df1c4b43756baa306 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sat, 17 Sep 2011 22:42:19 +0100 Subject: add target side for sss features --- decoder/ff_source_syntax.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'decoder/ff_source_syntax.cc') 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) -- cgit v1.2.3