diff options
author | Chris Dyer <redpony@gmail.com> | 2014-10-09 00:43:57 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-10-09 00:43:57 -0400 |
commit | 1d87fbb31502ba27f0469e4a576e410ee43ad77a (patch) | |
tree | dbc8a9d743a77fb1a6be229af2c49f9fe4858c8a /decoder/tree2string_translator.cc | |
parent | 8601c7fa4ca6fe8093ec54cd2c150cf130484297 (diff) |
make tree terminals available to feature functions
Diffstat (limited to 'decoder/tree2string_translator.cc')
-rw-r--r-- | decoder/tree2string_translator.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/decoder/tree2string_translator.cc b/decoder/tree2string_translator.cc index bd3b01d0..61a3aba5 100644 --- a/decoder/tree2string_translator.cc +++ b/decoder/tree2string_translator.cc @@ -287,6 +287,8 @@ struct Tree2StringTranslatorImpl { const vector<double>& weights, Hypergraph* minus_lm_forest) { cdec::TreeFragment input_tree(input, false); + smeta->src_tree_ = input_tree; + smeta->input_type_ = cdec::kTREE; if (add_pass_through_rules) CreatePassThroughRules(input_tree); Hypergraph hg; hg.ReserveNodes(input_tree.nodes.size()); |