class_docstr: Runs pre-tokenization with Jieba segmentation tool. It is used in CPM models.
class_docstr_tok: ["Runs","pre-tokenization","with","Jieba","segmentation","tool",".","It","is","used","in","CPM","models","."]
docstr: Converts a token (str) in an id using the vocab.
docstr_tok: ["Converts","a","token","(","str",")","in","an","id","using","the","vocab","."]
code: def _convert_token_to_id(self, token):
      """Converts a token (str) in an id using the vocab."""
      return self.sp_model.PieceToId(token)
  
imports: import os
  import unicodedata
  from shutil import copyfile
  from typing import Any, Dict, List, Optional, Tuple
  import sentencepiece
  from ...tokenization_utils import AddedToken, PreTrainedTokenizer
  from ...utils import SPIECE_UNDERLINE, logging
label_desc: Use image node_id 8 for calling the CpmTokenizer obj's underlying member method code with example usage: obj._convert_token_to_id(token) and returns: self