code: def build(self):
          
          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)
docs: Build vocabulary.