You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
371 B
Python
11 lines
371 B
Python
import gensim.downloader as api
|
|
wv = api.load('word2vec-google-news-300')
|
|
|
|
# Affichage de quelques mots du vocabulaire
|
|
# for index, word in enumerate(wv.index_to_key):
|
|
# if index == 10:
|
|
# break
|
|
# print(f"word #{index}/{len(wv.index_to_key)} is {word}")
|
|
|
|
print(wv.most_similar(positive=['car'], topn=5))
|
|
print(wv.most_similar(positive=['voiture'], topn=5)) |