Loading src/absinth.py +4 −3 Original line number Diff line number Diff line Loading @@ -723,8 +723,7 @@ def draw_propagation(graph: nx.Graph, root_hub_list: list) -> None: pass pos = nx.spring_layout(graph) pos = nx.spring_layout(graph, scale=3) mapping = {node:graph.node[node]['sense'] for node in graph.nodes} Loading @@ -741,7 +740,7 @@ def draw_propagation(graph: nx.Graph, root_hub_list: list) -> None: nx.draw_networkx_labels(graph,pos,labels,font_size=14) plt.axis('off') plt.savefig('../figures/'+''.join([r[:2] for r in root_hub_list])+'.png') plt.savefig('../figures/'+graph.graph['target']+'.png') plt.clf() Loading Loading @@ -1081,6 +1080,8 @@ def main(topic_id: int, topic_name: str, result_dict: dict) -> None: graph, root_hub_list, stat_dict = induce(topic_name, result_dict[topic_id]) graph.graph['target'] = topic_name stat_dict['L'] = characteristic_path_length(graph) stat_dict['C'] = global_clustering_coefficient(graph) Loading Loading
src/absinth.py +4 −3 Original line number Diff line number Diff line Loading @@ -723,8 +723,7 @@ def draw_propagation(graph: nx.Graph, root_hub_list: list) -> None: pass pos = nx.spring_layout(graph) pos = nx.spring_layout(graph, scale=3) mapping = {node:graph.node[node]['sense'] for node in graph.nodes} Loading @@ -741,7 +740,7 @@ def draw_propagation(graph: nx.Graph, root_hub_list: list) -> None: nx.draw_networkx_labels(graph,pos,labels,font_size=14) plt.axis('off') plt.savefig('../figures/'+''.join([r[:2] for r in root_hub_list])+'.png') plt.savefig('../figures/'+graph.graph['target']+'.png') plt.clf() Loading Loading @@ -1081,6 +1080,8 @@ def main(topic_id: int, topic_name: str, result_dict: dict) -> None: graph, root_hub_list, stat_dict = induce(topic_name, result_dict[topic_id]) graph.graph['target'] = topic_name stat_dict['L'] = characteristic_path_length(graph) stat_dict['C'] = global_clustering_coefficient(graph) Loading