def _convert_token_to_id(self, token):
        """Converts a token (str) in an id using the vocab."""
        if self.subword_tokenizer_type == "sentencepiece":
            return self.subword_tokenizer.sp_model.PieceToId(token)
        return self.vocab.get(token, self.vocab.get(self.unk_token))
Converts a token (str) in an id using the vocab.
dpkd/transformers/src/transformers/models/bert_japanese/tokenization_bert_japanese.py