diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-09-17 22:42:19 +0100 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-09-17 22:42:19 +0100 |
commit | 4b619c0ca5b8c521c6fb4c3df1c4b43756baa306 (patch) | |
tree | c8383237abbce9ae4dac6ade1a22d1c2c961c1b6 /decoder | |
parent | 538361fb1ea261ba49d3cec7d88352473ab49eab (diff) |
add target side for sss features
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/ff_source_syntax.cc | 9 |
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) |