def _build_encoder(self, vocab,
                     tokenizer):
    """Build the encoder using the given vocab and tokenizer.

    Args:
      vocab: Vocab to build encoder from
      tokenizer: Tokenizer to build encoder from

    Returns:
      The built text encoder
    """
    if self._model_config.text_encoder == 'basic':
      return preprocessing.BasicTextEncoder(
          vocab_list=vocab,
          tokenizer=tokenizer,
          lowercase=self._model_config.basic_lowercase,
          include_title=self._model_config.include_title,
          include_sentence_id=self._model_config.include_sentence_id,
          max_claim_tokens=self._model_config.max_claim_tokens,
          max_evidence_tokens=self._model_config.max_evidence_tokens,
      )
    elif self._model_config.text_encoder == 'bert':
      return preprocessing.BertTextEncoder(
          tokenizer=tokenizer,
          max_seq_length=self._model_config.bert_max_seq_length,
          include_title=self._model_config.include_title,
          include_sentence_id=self._model_config.include_sentence_id,
      )
Build the encoder using the given vocab and tokenizer.

    Args:
      vocab: Vocab to build encoder from
      tokenizer: Tokenizer to build encoder from

    Returns:
      The built text encoder
    
language/serene/training.py