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: Build vocabulary.
docstr_tok: ["Build","vocabulary","."]
code: def build(self):
      """
      Build vocabulary.
      """
      token_freq = self._token_count.most_common(self._max_size)
      idx = len(self.vocab)
      for token, _ in token_freq:
          self._token2id[token] = idx
          self._id2token.append(token)
          idx += 1
      if self._unk:
          unk = "<unk>"
          self._token2id[unk] = idx
          self._id2token.append(unk)
  
imports: import math
  import os
  from collections import Counter
  import numpy
  from keras.utils import Sequence, get_file
label_desc: Use image node_id 7 for calling the Vocabulary obj's underlying member method code with example usage: obj.build() without return types