class_docstr: Wraps Gensim's `models.keyedvectors` module
  (https://radimrehurek.com/gensim/models/keyedvectors.html)
class_docstr_tok: ["Wraps","Gensim","'s","`","models.keyedvectors","`","module","(","https",":","\/\/radimrehurek.com\/gensim\/models\/keyedvectors.html",")"]
docstr: Convert between word to id (i.e. index of word in embedding matrix)
  Args:
      word (str)
  Returns:
      index (int)
docstr_tok: ["Convert","between","word","to","id","(","i.e",".","index","of","word","in","embedding","matrix",")","Args",":","word","(","str",")","Returns",":","index","(","int",")"]
code: def word2index(self, word):
      """
      Convert between word to id (i.e. index of word in embedding matrix)
      Args:
          word (str)
      Returns:
          index (int)
      """
      vocab = self.keyed_vectors.key_to_index.get(word)
      if vocab is None:
          raise KeyError(word)
      return vocab
  
imports: from abc import ABC, abstractmethod
  from collections import defaultdict
  import os
  import pickle
  import numpy
  import torch
  from textattack.shared import utils
label_desc: Use image node_id 3 for calling the GensimWordEmbedding obj's underlying member method code with example usage: obj.word2index(word) and returns: vocab