From 9b1c97670fa15321eb4c0301571ace7acb6fe302 Mon Sep 17 00:00:00 2001
From: Victor Zimmermann <zimmermann@cl.uni-heidelberg.de>
Date: Wed, 21 Mar 2018 22:31:48 +0100
Subject: [PATCH] Minor changes, now in sort-of final state.

---
 src/absinth.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/absinth.py b/src/absinth.py
index 5c16425..69b4dc5 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)
 
-- 
GitLab