class_docstr: A vocabulary that maps tokens to ints (storing a vocabulary).
  
  Attributes:
      _token_count: A collections.Counter object holding the frequencies of tokens
          in the data used to build the Vocabulary.
      _token2id: A collections.defaultdict instance mapping token strings to
          numerical identifiers.
      _id2token: A list of token strings indexed by their numerical identifiers.
class_docstr_tok: ["A","vocabulary","that","maps","tokens","to","ints","(","storing","a","vocabulary",")",".","Attributes",":","_token_count",":","A","collections.Counter","object","holding","the","frequencies","of","tokens","in","the","data","used","to","build","the","Vocabulary",".","_token2id",":","A","collections.defaultdict","instance","mapping","token","strings","to","numerical","identifiers",".","_id2token",":","A","list","of","token","strings","indexed","by","their","numerical","identifiers","."]
docstr: Create a Vocabulary object.
  
  Args:
      max_size: The maximum size of the vocabulary, or None for no
          maximum. Default: None.
      lower: boolean. Whether to convert the texts to lowercase.
      unk_token: boolean. Whether to add unknown token.
      specials: The list of special tokens (e.g., padding or eos) that
          will be prepended to the vocabulary. Default: ('<pad>',)
docstr_tok: ["Create","a","Vocabulary","object",".","Args",":","max_size",":","The","maximum","size","of","the","vocabulary",",","or","None","for","no","maximum",".","Default",":","None",".","lower",":","boolean",".","Whether","to","convert","the","texts","to","lowercase",".","unk_token",":","boolean",".","Whether","to","add","unknown","token",".","specials",":","The","list","of","special","tokens","(","e.g.",",","padding","or","eos",")","that","will","be","prepended","to","the","vocabulary",".","Default",":","(","'","<","pad",">","'",",",")"]
code: def __init__(
      self,
      max_size=None,
      lower=True,
      unk_token=True,
      specials=("<pad>",),
  ):
      """Create a Vocabulary object.
  
      Args:
          max_size: The maximum size of the vocabulary, or None for no
              maximum. Default: None.
          lower: boolean. Whether to convert the texts to lowercase.
          unk_token: boolean. Whether to add unknown token.
          specials: The list of special tokens (e.g., padding or eos) that
              will be prepended to the vocabulary. Default: ('<pad>',)
      """
      self._max_size = max_size
      self._lower = lower
      self._unk = unk_token
      self._token2id = {token: i for i, token in enumerate(specials)}
      self._id2token = list(specials)
      self._token_count = Counter()
  
imports: import math
  import os
  from collections import Counter
  import numpy
  from keras.utils import Sequence, get_file
label_desc: Use image node_id 1 to create a new Vocabulary object from inherited base classes: object with example: obj = Vocabulary(max_size, lower, unk_token, specials)