From d124d4aaa78b52b46f7ac8d7306be342d3405124 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 1 Jul 2014 13:49:47 -0400 Subject: track spans in t2s translation --- decoder/tree2string_translator.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'decoder/tree2string_translator.cc') diff --git a/decoder/tree2string_translator.cc b/decoder/tree2string_translator.cc index c9c91a37..adc8dc89 100644 --- a/decoder/tree2string_translator.cc +++ b/decoder/tree2string_translator.cc @@ -332,7 +332,9 @@ struct Tree2StringTranslatorImpl { assert(tail.size() == r->Arity()); HG::Edge* new_edge = hg.AddEdge(r, tail); new_edge->feature_values_ = r->GetFeatureValues(); - // TODO: set i and j + auto& inspan = input_tree.nodes[s.task.input_node_idx].span; + new_edge->i_ = inspan.first; + new_edge->j_ = inspan.second; hg.ConnectEdgeToHeadNode(new_edge, &hg.nodes_[node_id]); } for (const auto& n : s.future_work) { -- cgit v1.2.3