Here, we've loaded the pre-trained Word2Vec embeddings from NLTK. Your task is to print the degree of similarity between the words "piano" and "guitar", rounded up to 3 decimal places.
Word2Vec
Similarity Degree
Report a typo
Write a program in Python 3
import gensim
from nltk.data import find
word2vec_sample = find('models/word2vec_sample/pruned.word2vec.txt')
w2v_model = gensim.models.KeyedVectors.load_word2vec_format(word2vec_sample, binary=False)
# write your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.