From 213ad0bfcb1774ea50c8258264308e536332058a Mon Sep 17 00:00:00 2001 From: jonibek1999 Date: Mon, 5 Feb 2024 15:20:51 +0400 Subject: [PATCH] Fix subnodes ids for root node alt_burmese_treebank --- .../alt_burmese_treebank/utils/alt_burmese_treebank_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seacrowd/sea_datasets/alt_burmese_treebank/utils/alt_burmese_treebank_utils.py b/seacrowd/sea_datasets/alt_burmese_treebank/utils/alt_burmese_treebank_utils.py index e08e23b40..3e78e6cc6 100644 --- a/seacrowd/sea_datasets/alt_burmese_treebank/utils/alt_burmese_treebank_utils.py +++ b/seacrowd/sea_datasets/alt_burmese_treebank/utils/alt_burmese_treebank_utils.py @@ -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)