Commit af8e06da authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Bugfixes.

parent 4b622664
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -165,9 +165,9 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict):
            new_dict = dict()
            for key,value in edge_freq_dict.items():
                if key[0] in new_dict:
                    new_dict[0].add({key[1]:value})
                    new_dict[key[0]].add({key[1]:value})
                else:
                    new_dict[0] = {key[1]:value}
                    new_dict[key[0]] = {key[1]:value}

            json.dump(new_dict, edge_file)

+3 −3
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict):
    
    if graph_in_existence == False:

        node_freq_dict, edge_freq_dict = frequencies(target_string, result_list)
        node_freq_dict, edge_freq_dict = frequencies(topic_name, result_list)
        
        with open(config.graph+node_dict_name, 'w') as node_file, open(config.graph+edge_dict_name, 'w') as edge_file:
            
@@ -383,9 +383,9 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict):
            new_dict = dict()
            for key,value in edge_freq_dict.items():
                if key[0] in new_dict:
                    new_dict[0].add({key[1]:value})
                    new_dict[key[0]].add({key[1]:value})
                else:
                    new_dict[0] = {key[1]:value}
                    new_dict[key[0]] = {key[1]:value}

            edge_freq_dict = new_dict
            json.dump(new_dict, edge_file)
+2 −2
Original line number Diff line number Diff line
@@ -50,8 +50,8 @@ Choose filters for building the graph.
- Only considers occurrences/cooccurrences for nodes/edges, that occur more often than these values.
- Only considers edges with a weight beneath the maximum weight
'''
min_node_freq = 10
min_edge_freq = 5
min_node_freq = 8
min_edge_freq = 4
max_weight = 0.9

'''