diff --git a/code/absinth_nx.py b/code/absinth_nx.py index ce072f4108031619b470b6a05b5479b72820b144..baef7fe4040383666a094a9b1d7ec8d620b97197 100644 --- a/code/absinth_nx.py +++ b/code/absinth_nx.py @@ -26,7 +26,7 @@ def frequencies(corpus_path, target, stop_words=[], allowed_tags=['NN','NNS','JJ max_node_ratio = len(node_freq)/max_nodes max_edge_ratio = len(edge_freq)/max_edges ratios = [file_ratio, max_node_ratio, max_edge_ratio] - print('~ {}%\tNodes: {}\tEdges: {}.'.format(int((max(ratios))*100), len(node_freq), len(edge_freq))) + print(' ~{}%\tNodes: {}\tEdges: {}.'.format(int((max(ratios))*100), len(node_freq), len(edge_freq))) if len(node_freq) > max_nodes: return node_freq, edge_freq @@ -273,14 +273,14 @@ if __name__ == '__main__': H = root_hubs(G, edge_freq) for h in H: mfn = sorted(G.adj[h], key=lambda key: edge_freq[h,key] if h < key else edge_freq[key, h], reverse=True)[:6] - print('{}: {}\n'.format(h, mfn)) + print(' {}: {}\n'.format(h, mfn)) print('[A] Building Minimum Spanning Tree.\n') T = components(G, H, target) print('[A] Disambiguating Results...') D = disambiguate(T, H, results[key]) - print('Mapping:', D, '\n') + print(' Mapping:', D, '\n') print('[A] Writing to file '+target+'.absinth.\n\n') for d in D: