Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

gensim loop keyed vector

model=gensim.models.KeyedVectors.load_word2vec_format('words.bin', binary=True, unicode_errors='ignore');
for index, word in enumerate(model.wv.vocab):
    print(index)  #prints the index
    print(word) #prints the word 
    print(model.wv[word]) #prints the word vector
 
PREVIOUS NEXT
Tagged: #gensim #loop #keyed #vector
ADD COMMENT
Topic
Name
1+6 =