Loading src/absinth.py +2 −2 Original line number Diff line number Diff line Loading @@ -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) Loading src/abstinent.py +3 −3 Original line number Diff line number Diff line Loading @@ -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: Loading @@ -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) Loading src/config.py +2 −2 Original line number Diff line number Diff line Loading @@ -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 ''' Loading Loading
src/absinth.py +2 −2 Original line number Diff line number Diff line Loading @@ -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) Loading
src/abstinent.py +3 −3 Original line number Diff line number Diff line Loading @@ -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: Loading @@ -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) Loading
src/config.py +2 −2 Original line number Diff line number Diff line Loading @@ -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 ''' Loading