diff --git a/src/absinth.py b/src/absinth.py index 0f93120be64d4e58fb652db0e09d11c4a14f41c4..1c527ff87cdfeac6d2be72ce36bad9eb822cfe9c 100644 --- a/src/absinth.py +++ b/src/absinth.py @@ -150,6 +150,8 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict): edge_freq_dict = {(key1,key2):value2 for key1,value1 in edge_freq_dict.items() for key2,value2 in value1.items()} + print('[a] Collected frequencies from secret hideout.') + continue if graph_in_existence == False: @@ -167,8 +169,7 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict): else: new_dict[0] = {key[1]:value} - edge_freq_dict = new_dict - json.dump(edge_freq_dict, edge_file) + json.dump(new_dict, edge_file) #builds graph from these dictionaries, also applies multiple filters print('[a]', 'Building graph.\t('+topic_name+')') diff --git a/src/abstinent.py b/src/abstinent.py index 99e4468fdc311a2f05a2d22d7de81ef5c201a7e6..e4aa17079f02e8f019e6b668d14352738ceaec3e 100644 --- a/src/abstinent.py +++ b/src/abstinent.py @@ -368,6 +368,8 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict): edge_freq_dict = {(key1,key2):value2 for key1,value1 in edge_freq_dict.items() for key2,value2 in value1.items()} + print('[a] Collected frequencies from hidden hideout.') + continue if graph_in_existence == False: @@ -386,7 +388,7 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict): new_dict[0] = {key[1]:value} edge_freq_dict = new_dict - json.dump(edge_freq_dict, edge_file) + json.dump(new_dict, edge_file) #builds graph from these dictionaries, also applies multiple filters print('[a]', 'Building graph.\t('+topic_name+')')