Skip to content
Snippets Groups Projects
Commit af8e06da authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Bugfixes.

parent 4b622664
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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)
......
......@@ -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
'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment