Commit 8de124b9 authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Added printing statement for memoisation.

parent 6c361958
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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+')')
+3 −1
Original line number Diff line number Diff line
@@ -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+')')