Skip to content

Commit

Permalink
Fix subnodes ids for root node alt_burmese_treebank
Browse files Browse the repository at this point in the history
  • Loading branch information
MJonibek committed Feb 5, 2024
1 parent 6013b40 commit 213ad0b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def extract_data(sentence):
sub_node_ids.extend([i + 1 for i in range(len(root_subnodes))])
root_text = extract_sentence(root_sent)

nodes.append({"id": f"{sentence_id+'.'+str(0)}", "type": "ROOT", "text": root_text, "offsets": [0, len(root_text) - 1], "subnodes": [f"{len(nodes)+i+1}" for i in range(len(sub_nodes))]})
nodes.append({"id": f"{sentence_id+'.'+str(0)}", "type": "ROOT", "text": root_text, "offsets": [0, len(root_text) - 1], "subnodes": [f"{sentence_id+'.'+str(i)}" for i in sub_node_ids]})

while sub_node_ids:
sub_node_id = sub_node_ids.pop(0)
Expand Down

0 comments on commit 213ad0b

Please sign in to comment.