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())
docstr: Return whether the token at `token_id` is a word; False for punctuations.
code: def is_word(self, token_id: int) -> bool:
      """Return whether the token at `token_id` is a word; False for punctuations."""
      if token_id < 4:
          return False
      if token_id >= len(self):
          return True  # OOV is assumed to be words
      token_str = self.index2word[token_id]
      if not word_detector.search(token_str) or token_str == "<P>":
          return False
      return True
  
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 9 for calling the Vocab obj's underlying member method code with example usage: obj.is_word(token_id) and returns: True, False, True, False