def _build_tokenizer(self):
    """Build the correct tokenizer depending on model encoder.

    Returns:
      Tokenizer for model
    """
    if self._model_config.tokenizer == 'basic':
      base_tokenizer = tfds.deprecated.text.Tokenizer()
      return tokenizers.ReservedTokenizer(
          tokenizer=base_tokenizer, reserved_re=preprocessing.SEPARATOR_RE)
    elif self._model_config.tokenizer == 'bert':
      return tokenizers.BertTokenizer(
          vocab_file=self._model_config.bert_vocab_path, do_lower_case=True)
    else:
      raise ValueError('Invalid tokenizer')
Build the correct tokenizer depending on model encoder.

    Returns:
      Tokenizer for model
    
language/serene/training.py