Skip to content
Snippets Groups Projects
Commit 6232f19b authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Add target word from input line for testing purposes

parent dd95c9dc
No related branches found
No related tags found
No related merge requests found
import os # for reading files
import sys
#from tqdm import tqdm # for counting seconds
import spacy # for nlp
import networkx as nx # for visualisation
......@@ -186,7 +187,7 @@ if __name__ == '__main__':
corpus_path = '/proj/absinth/wikipedia.txt.dump.20140615-en.SZTAKI'
G = Graph() #initialises graph
G.build(corpus_path, 'division_by_zero', filters) #builds graph from corpus with target and filters
G.build(corpus_path, sys.argv[1], filters) #builds graph from corpus with target and filters
for hub in G.root_hubs():
print(hub.key,'-->', list(hub.neighbors.keys()), '\n') #prints senses
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment