<jupyter_start><jupyter_text>Step 1 - Install Gensim, and Dowload the Word2Vec Model and vectors<jupyter_code># Install gensim
# !pip install gensim
import gensim
import gensim.downloader as api
model = api.load("glove-wiki-gigaword-100")  # download the model and return as object ready for use
model.most_similar("cat")
model.most_similar(positive=["information","retrieval"])
model.most_similar(positive=["artificial","intelligence"])
list(model.vocab.items())[0:10]
keys = model.vocab.keys()
vecs = []
key2vec = dict()
for k in keys:
    key2vec[k] = model[k]
len(key2vec)
import numpy
from numpy.linalg import norm

for k,v in list(key2vec.items())[:10]:
    print(k.ljust(10), norm(v))
# info = api.info()  # show info about available models/datasets
# from pprint import pprint
# pprint(info)
list(model.vocab.items())[-500:][:100]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.02534562211981567, 'mean_word_length': 6.181818181818182, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '248160', 'license': 'Apache-2.0', 'n_tokens_mistral': 330, 'n_tokens_neox': 312, 'n_words': 75, 'path': 'python/Tutorial.ipynb', 'repo_name': 'DiceTechJobs/VectorsInSearch', 'size': '868'}