class_docstr: A mapping from symbols to consecutive integers
code: def __init__(
      self,
      *,  # begin keyword-only arguments
      bos="<s>",
      pad="<pad>",
      eos="</s>",
      unk="<unk>",
      extra_special_symbols=None,
      add_special_symbols=True,
  ):
      self.bos_word, self.unk_word, self.pad_word, self.eos_word = (
          bos,
          unk,
          pad,
          eos,
      )
      self.symbols = []
      self.count = []
      self.indices = {}
      if add_special_symbols:
          self.bos_index = self.add_symbol(bos)
          self.pad_index = self.add_symbol(pad)
          self.eos_index = self.add_symbol(eos)
          self.unk_index = self.add_symbol(unk)
          if extra_special_symbols:
              for s in extra_special_symbols:
                  self.add_symbol(s)
          self.nspecial = len(self.symbols)
  
imports: import os
  from collections import Counter
  from multiprocessing import Pool
  import torch
  from fairseq import utils
  from fairseq.data import data_utils
  from fairseq.file_chunker_utils import Chunker, find_offsets
  from fairseq.file_io import PathManager
  from fairseq.tokenizer import tokenize_line
label_desc: Use image node_id 1 to create a new Dictionary object  with example: obj = Dictionary()