bug
This commit is contained in:
@@ -60,12 +60,12 @@ def create_nested_dictionary(lines, nested_dict={}):
|
|||||||
|
|
||||||
def create_title_tree(title, tree):
|
def create_title_tree(title, tree):
|
||||||
words = title.split()
|
words = title.split()
|
||||||
current_level = tree
|
dict_current_level = tree
|
||||||
for word in words:
|
for word in words:
|
||||||
if word not in current_level:
|
if word not in dict_current_level:
|
||||||
current_level[word] = {}
|
dict_current_level[word] = {}
|
||||||
current_level = current_level[word]
|
dict_current_level = dict_current_level[word]
|
||||||
current_level['='] = "ref"
|
dict_current_level['='] = "ref"
|
||||||
|
|
||||||
def create_province_tree(input_file):
|
def create_province_tree(input_file):
|
||||||
province_tree = {}
|
province_tree = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user