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 extend(self, tokens):
      self.itos.extend(sorted(set(tokens).difference(self.stoi)))
      self.stoi.update({token: i for i, token in enumerate(self.itos)})
  
file_path: underthesea/underthesea/utils/sp_vocab.py
imports: from collections import defaultdict
  from collections.abc import Iterable
label_desc: Use image node_id 7 for calling the Vocab obj's underlying member method code with example usage: obj.extend(tokens) without return types