Skip to main content
Minor formatting
Source Link
Stephen Rauch
  • 1.8k
  • 11
  • 22
  • 34

In short: Yes, you can.

You need to first load the vectors using the Gensim module in Python.

word2vec_path = "path_to_the_vectors/GoogleNews-vectors-negative300.bin" # Google news vectors
word2vec = gensim.models.KeyedVectors.load_word2vec_format(word2vec_path, binary=True)

w2v_vocabulary = word2vec.vocab # contains the list of all unique words in pre-trained word2vec vectors
# Load Google news vectors
word2vec_path = "path_to_the_vectors/GoogleNews-vectors-negative300.bin"
word2vec = gensim.models.KeyedVectors.load_word2vec_format(word2vec_path, binary=True)

# contains the list of all unique words in pre-trained word2vec vectors
w2v_vocabulary = word2vec.vocab

In short: Yes, you can.

You need to first load the vectors using the Gensim module in Python.

word2vec_path = "path_to_the_vectors/GoogleNews-vectors-negative300.bin" # Google news vectors
word2vec = gensim.models.KeyedVectors.load_word2vec_format(word2vec_path, binary=True)

w2v_vocabulary = word2vec.vocab # contains the list of all unique words in pre-trained word2vec vectors

In short: Yes, you can.

You need to first load the vectors using the Gensim module in Python.

# Load Google news vectors
word2vec_path = "path_to_the_vectors/GoogleNews-vectors-negative300.bin"
word2vec = gensim.models.KeyedVectors.load_word2vec_format(word2vec_path, binary=True)

# contains the list of all unique words in pre-trained word2vec vectors
w2v_vocabulary = word2vec.vocab
Source Link
PinkBanter
  • 394
  • 3
  • 15

In short: Yes, you can.

You need to first load the vectors using the Gensim module in Python.

word2vec_path = "path_to_the_vectors/GoogleNews-vectors-negative300.bin" # Google news vectors
word2vec = gensim.models.KeyedVectors.load_word2vec_format(word2vec_path, binary=True)

w2v_vocabulary = word2vec.vocab # contains the list of all unique words in pre-trained word2vec vectors