title: AttributeError: The vocab attribute was removed from KeyedVector in Gensim 4.0.0
body: <p>AttributeError                            Traceback (most recent call last)
  ~/Desktop/implimentaion/train.py in 
  31 use_w2v = True
  32
  ---&gt; 33 train_df, embeddings = make_w2v_embeddings(train_df, embedding_dim=embedding_dim, empty_w2v=not use_w2v)
  34
  35 # Split to train validation</p>
  <p>~/Desktop/implimentaion/util.py in make_w2v_embeddings(df, embedding_dim, empty_w2v)
  90
  91                 # If a word is missing from word2vec model.
  ---&gt; 92                 if word not in word2vec.vocab:
  93                     if word not in vocabs_not_w2v:
  94                         vocabs_not_w2v_cnt += 1</p>
  <p>~/opt/anaconda3/lib/python3.8/site-packages/gensim/models/keyedvectors.py in vocab(self)
  643     @property
  644     def vocab(self):
  --&gt; 645         raise AttributeError(
  646             &quot;The vocab attribute was removed from KeyedVector in Gensim 4.0.0.\n&quot;
  647             &quot;Use KeyedVector's .key_to_index dict, .index_to_key list, and methods &quot;</p>
  <p>AttributeError: The vocab attribute was removed from KeyedVector in Gensim 4.0.0.
  Use KeyedVector's .key_to_index dict, .index_to_key list, and methods .get_vecattr(key, attr) and .set_vecattr(key, attr, new_val) instead.
  See <a href="https://github.com/RaRe-Technologies/gensim/wiki/Migrating-from-Gensim-3.x-to-4" rel="nofollow noreferrer">https://github.com/RaRe-Technologies/gensim/wiki/Migrating-from-Gensim-3.x-to-4</a></p>