diff --git a/src/absinth.py b/src/absinth.py index 5c164253edf2d943bf8e3300e0e3ab415f37a2ab..69b4dc56d3a0d0b2c07c04f45e049a3f01795d9d 100644 --- a/src/absinth.py +++ b/src/absinth.py @@ -521,6 +521,10 @@ def induce(topic_name: str, result_list: list) -> (nx.Graph, list, dict): print('[a]', 'Building graph.\t('+topic_name+')') graph = build_graph(node_freq_dict, edge_freq_dict) + for string in topic_name.split('_'): + if string in graph.nodes: + graph.remove_node(string) + stat_dict['nodes'] = len(graph.nodes) stat_dict['edges'] = len(graph.edges)