class_docstr: Runs sentencepiece tokenization. Based on transformers.models.albert.tokenization_albert.AlbertTokenizer.
class_docstr_tok: ["Runs","sentencepiece","tokenization",".","Based","on","transformers.models.albert.tokenization_albert.AlbertTokenizer","."]
code: def __init__(
      self,
      vocab,
      unk_token,
      do_lower_case=False,
      remove_space=True,
      keep_accents=True,
      sp_model_kwargs: Optional[Dict[str, Any]] = None,
  ):
      self.vocab = vocab
      self.unk_token = unk_token
      self.do_lower_case = do_lower_case
      self.remove_space = remove_space
      self.keep_accents = keep_accents
  
      self.sp_model_kwargs = (
          {} if sp_model_kwargs is None else sp_model_kwargs
      )
      self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
      self.sp_model.Load(self.vocab)
  
imports: import collections
  import copy
  import os
  import unicodedata
  from typing import Any, Dict, List, Optional, Tuple
  from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
  from ...utils import is_sentencepiece_available, logging
label_desc: Use image node_id 1 to create a new SentencepieceTokenizer object from inherited base classes: object with example: obj = SentencepieceTokenizer(vocab, unk_token, do_lower_case, remove_space, keep_accents, sp_model_kwargs)