belizgunel/hyperE

Demo NameError: name 'make_edge_set' is not defined

jimbojw opened this issue · 1 comments

I'm trying to run the demo HyperE_demo.ipynb in a Jupyter Notebook. I have installed the dependencies and downloaded the wordnet NLTK data.

Running the notebook works up to the cell that begins with the comment "Creating the edge list for hypernym relationship in Wordnet." It fails with the following error:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-10-e8a28bbcc444> in <module>
     24 
     25 
---> 26 SynstoIDs, IDstoSyns, X, all_syns = load_wordnet()
     27 G = nx.from_scipy_sparse_matrix(X)
     28 Gc = max(nx.connected_component_subgraphs(G), key=len)

<ipython-input-10-e8a28bbcc444> in load_wordnet()
     11 
     12     n = len(all_syns)
---> 13     e = make_edge_set()
     14 
     15     for idx, x in enumerate(all_syns):

NameError: name 'make_edge_set' is not defined

Where is make_edge_set() defined?

Looks like maybe make_edge_set is defined here: https://github.com/belizgunel/hyperE/blob/master/preprocess/wordnet_preprocess.py

And that there is a missing load command for the preprocess scripts?