class_docstr: Vocab class.
  
  Parameters
  ----------
  lower_case : boolean
      Specify whether to lowercase text, default: ``True``.
  tokenizer: function, optional
      Word tokenization function, default: nltk.tokenize.word_tokenize.
  
  Examples
  -------
  >>> word_vocab = Vocab()
  >>> word_vocab.build_vocab({'i': 10, 'like': 5, 'nlp': 3})
  >>> print(word_vocab.get_vocab_size())
code: def getIndex(self, word, use_ie=False):
      # For IE Graph
      # word can be a phrase
      if use_ie:
          if self.lower_case:
              word = word.lower()
  
          ret = []
          for x in word.replace("_", " ").split(" "):
              if x == "":
                  continue
              ret.append(self.word2index.get(x, self.UNK))
  
          return ret
  
      if self.lower_case:
          word = word.lower()
  
      return self.word2index.get(word, self.UNK)
  
imports: import os
  import pickle
  import re
  import warnings
  from collections import Counter
  from functools import lru_cache
  import numpy
  import torch
  from nltk.tokenize import word_tokenize
  from torchtext.vocab import GloVe, Vectors
  from .None import constants
label_desc: Use image node_id 11 for calling the Vocab obj's underlying member method code with example usage: obj.getIndex(word, use_ie) and returns: self, ret