class_docstr: Defines a vocabulary object that will be used to numericalize a field.
  
  Args:
      counter (~collections.Counter):
          :class:`~collections.Counter` object holding the frequencies of each value found in the data.
      min_freq (int):
          The minimum frequency needed to include a token in the vocabulary. Default: 1.
      specials (list[str]):
          The list of special tokens (e.g., pad, unk, bos and eos) that will be prepended to the vocabulary. Default: [].
      unk_index (int):
          The index of unk token. Default: 0.
  
  Attributes:
      itos:
          A list of token strings indexed by their numerical identifiers.
      stoi:
          A :class:`~collections.defaultdict` object mapping token strings to numerical identifiers.
code: def __getitem__(self, key):
      if isinstance(key, str):
          return self.stoi[key]
      elif not isinstance(key, Iterable):
          return self.itos[key]
      elif isinstance(key[0], str):
          return [self.stoi[i] for i in key]
      else:
          return [self.itos[i] for i in key]
  
file_path: underthesea/underthesea/utils/sp_vocab.py
imports: from collections import defaultdict
  from collections.abc import Iterable
label_desc: Use image node_id 3 for calling the Vocab obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, self, unknown, unknown