Complete the code to import the Word2Vec model from gensim.
from gensim.models import [1]
The correct class name to import is Word2Vec with capital W and V.
Complete the code to initialize a Word2Vec model with vector size 100.
model = Word2Vec(sentences, vector_size=[1], window=5, min_count=1, workers=4)
The vector size parameter controls the size of word vectors. Here, 100 is a common choice.
Fix the error in the code to train the Word2Vec model on sentences.
model.[1](sentences)The correct method to train a Word2Vec model is train.
Fill both blanks to create a dictionary of word vectors for words with frequency above 2.
word_vectors = {word: model.wv.[1](word) for word in model.wv.index_to_key if model.wv.get_vecattr(word, '[2]') > 2}get_vector retrieves the vector for a word, and count is the attribute for word frequency.
Fill all three blanks to save the trained model and then load it back.
model.[1]('word2vec.model') loaded_model = Word2Vec.[2]('word2vec.model') vector = loaded_model.wv.[3]('example')
Use save to save the model, load to load it, and get_vector to get a word's vector.
