From 43f46a17a3c0cd254cc0c2ab6a7c1d33a543f4b0 Mon Sep 17 00:00:00 2001 From: hsafaei Date: Sat, 15 Feb 2025 17:36:44 +0330 Subject: [PATCH] bug --- tagging_ner_lists.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tagging_ner_lists.py b/tagging_ner_lists.py index 0e13e87..0009560 100644 --- a/tagging_ner_lists.py +++ b/tagging_ner_lists.py @@ -60,12 +60,12 @@ def create_nested_dictionary(lines, nested_dict={}): def create_title_tree(title, tree): words = title.split() - current_level = tree + dict_current_level = tree for word in words: - if word not in current_level: - current_level[word] = {} - current_level = current_level[word] - current_level['='] = "ref" + if word not in dict_current_level: + dict_current_level[word] = {} + dict_current_level = dict_current_level[word] + dict_current_level['='] = "ref" def create_province_tree(input_file): province_tree = {}