Similarity Degree

Report a typo

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.

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
___

Create a free account to access the full topic