class_docstr: Vocabulary class.
  
  :param pad_value: The string value for the padding position.
  :param oov_value: The string value for the out-of-vocabulary terms.
  
  Examples:
      >>> vocab = BertVocabulary(pad_value='[PAD]', oov_value='[UNK]')
      >>> indices = vocab.transform(list('ABCDDZZZ'))
class_docstr_tok: ["Vocabulary","class",".",":","param","pad_value",":","The","string","value","for","the","padding","position",".",":","param","oov_value",":","The","string","value","for","the","out-of-vocabulary","terms",".","Examples",":",">",">",">","vocab","=","BertVocabulary","(","pad_value=","'","[","PAD","]","'",",","oov_value=","'","[","UNK","]","'",")",">",">",">","indices","=","vocab.transform","(","list","(","'ABCDDZZZ","'",")",")"]
docstr: Vocabulary unit initializer.
docstr_tok: ["Vocabulary","unit","initializer","."]
code: def __init__(
      self, pad_value: str = "[PAD]", oov_value: str = "[UNK]"
  ):
      """Vocabulary unit initializer."""
      super().__init__()
      self._pad = pad_value
      self._oov = oov_value
      self._context["term_index"] = self.TermIndex()
      self._context["index_term"] = {}
  
file_path: MatchZoo/matchzoo/preprocessors/units/vocabulary.py
imports: from .stateful_unit import StatefulUnit
label_desc: Use image node_id 1 to create a new BertVocabulary object from inherited base classes: StatefulUnit with example: obj = BertVocabulary(pad_value, oov_value)