Open networks1 opened 1 year ago
For anyone else having the same problem, I got this working on Python3/numpy 1.19.5/ gensim 3.8.3/networkx 2.5/node2vec 0.4.3. As follows:
Change print statements in word2vec.py to Python3 syntax (lines 46 and 48)
Change main.py line 71 from
G = nx.read_edgelist(args.input, nodetype=int, data=(('weight',float),), create_using=nx.DiGraph())
to
G = nx.read_weighted_edgelist(args.input, nodetype=int, create_using=nx.DiGraph())
In both word2vec.py and base_any2vec.py (both in Python36/Lib/site-packages/gensim/models) change
len(sentence)
to
len(list(sentence))
Change line 90 of main.py from
model.save_word2vec_format(args.output)
to
model.wv.save_word2vec_format(args.output)
this is helpful
I have changed the print statements to the new syntax. Getting other errors though. Is there a Python3 version of this software?