class_docstr: Vocabulary basically contains mapping between numbers and tokens and vice versa.
  
  Parameters
  ----------
  idx2tok: List[str], required
      List of tokens where list indices are corresponding to
      their mapped integer indices.
  
  use_special_tokens: bool, optional, default: False
      If `True`, vocabulary will include `SPECIAL_TOKENS`.
class_docstr_tok: ["Vocabulary","basically","contains","mapping","between","numbers","and","tokens","and","vice","versa",".","Parameters","--","--","--","--","--","idx2tok",":","List","[","str","]",",","required","List","of","tokens","where","list","indices","are","corresponding","to","their","mapped","integer","indices",".","use_special_tokens",":","bool",",","optional",",","default",":","False","If","`","True","`",",","vocabulary","will","include","`","SPECIAL_TOKENS","`","."]
docstr: Convert a list of `tokens` to their integer indices.
  
  Parameters
  ----------
  tokens: List[str], required
      List of string tokens.
  
  Returns
  -------
  indices: List[int]
      List of integer indices corresponding to input `tokens`.
docstr_tok: ["Convert","a","list","of","`","tokens","`","to","their","integer","indices",".","Parameters","--","--","--","--","--","tokens",":","List","[","str","]",",","required","List","of","string","tokens",".","Returns","--","--","--","-","indices",":","List","[","int","]","List","of","integer","indices","corresponding","to","input","`","tokens","`","."]
code: def to_idx(self, tokens: List[str]) -> List[int]:
      """Convert a list of `tokens` to their integer indices.
  
      Parameters
      ----------
      tokens: List[str], required
          List of string tokens.
  
      Returns
      -------
      indices: List[int]
          List of integer indices corresponding to input `tokens`.
  
      """
      return [self.tok2idx.get(tok, 1) for tok in tokens]
  
imports: from typing import List, Dict, Callable, Union
  from collections import defaultdict, Counter, OrderedDict
  import string
  import pickle
  import re
  import numpy
  import scipy.sparse
  from .None import FeatureModality
  from .modality import fallback_feature
  from ..utils import normalize
label_desc: Use image node_id 5 for calling the Vocabulary obj's underlying member method code with example usage: obj.to_idx(tokens) and returns: unknown