summaryrefslogtreecommitdiff
path: root/decoder/tree2string_translator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/tree2string_translator.cc')
-rw-r--r--decoder/tree2string_translator.cc4
1 files changed, 3 insertions, 1 deletions
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) {