0
votes

the version of python is 3.6 I tried to execute my code but, there are still some errors as below:

Traceback (most recent call last):

File "C:\Users\tmdgu\Desktop\NLP-master1\NLP-master\Ontology_Construction.py", line 55, in , binary=True)

File "E:\Program Files\Python\Python35-32\lib\site-packages\gensim\models\word2vec.py", line 1282, in load_word2vec_format raise DeprecationWarning("Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead.")

DeprecationWarning: Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead.

how to fix the code? or is the path to data wrong?

1

1 Answers

2
votes

This is just a warning, not a fatal error. Your code likely still works.

"Deprecation" means a function's use has been marked by the authors as no longer encouraged.

The function typically still works, but may not for much longer – becoming unreliable or unavailable in some future library release. Often, there's a newer, more-preferred way to do the same thing, so you don't trigger the warning message.

Your warning message points you at the now-preferred way to load word-vectors of that format: use KeyedVectors.load_word2vec_format() instead.

Did you try using that, instead of whatever line of code (not shown in your question) that you were trying before seeing the warning?