Skip to content

Commit

Permalink
Fix 'Deprecated:gensim.models.Word2Vec.load_word2vec_format' with 'ge…
Browse files Browse the repository at this point in the history
…nsim.models.KeyedVectors.load_word2vec_format' instead.
  • Loading branch information
lucas0 committed Jun 26, 2018
1 parent 304cf47 commit 08e5a12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tree_model/Word2VecFeatureGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def process(self, df):

# 1). document vector built by multiplying together all the word vectors
# using Google's pre-trained word vectors
model = gensim.models.Word2Vec.load_word2vec_format('GoogleNews-vectors-negative300.bin', binary=True)
model = gensim.models.KeyedVectors.load_word2vec_format('GoogleNews-vectors-negative300.bin', binary=True)
print 'model loaded'

Headline_unigram_array = df['Headline_unigram_vec'].values
Expand Down

0 comments on commit 08e5a12

Please sign in to comment.