code: 
  
  
  from typing import List
  
  from tokenizers import NormalizedString, PreTokenizedString, normalizers
  
  
  
  
  
  
  
  class 					__lowercase					:
  
  
  
  		"""simple docstring"""
  
  		def __init__(   self		,			A  )     ->   None:
  
  
  
  
  
  
  
  					'''simple docstring'''
  
  
  
  
  
  
  
  					lowerCamelCase								=     vocab
  					lowerCamelCase								=     normalizers.BertNormalizer(
  					    clean_text=A		,			handle_chinese_chars=A		,			strip_accents=A		,			lowercase=A		,			)
  					try:
  								import rjieba
  					except ImportError:
  								raise ImportError(
  								    """You need to install rjieba to use RoFormerTokenizer. """
  								    """See https://pypi.org/project/rjieba/ for installation."""  )
  					lowerCamelCase								=     rjieba
  
  
  
  
  
  
  
  		def 				__A      (   self		,			A		,			A  )     ->   List[NormalizedString]:
  
  
  
  
  
  
  
  					'''simple docstring'''
  
  
  
  
  
  
  
  					lowerCamelCase								=     []
  
  					# this code slice normalized_string is too slow (6s) but test_alignement_methods can pass
  					for token, start, end in self.jieba.tokenize(str(A  )		,			hmm=A  ):
  								if token in self.vocab:
  											splits.append(normalized_string[start:end]  )
  								else:
  											lowerCamelCase								=     self.normalizers.normalize_str(A  ).split()
  											for token in token_list:
  														if token:
  																	lowerCamelCase								=     start + len(A  )
  																	splits.append(normalized_string[start:end]  )
  																	lowerCamelCase								=     end
  
          # this code test_alignement_methods can't pass but fast (300ms)
          # for token in self.jieba.cut(str(normalized_string), False):
          #     if token in self.vocab:
          #         splits.append(NormalizedString(token))
          #     else:
          #         token_list = self.normalizers.normalize_str(token).split()
          #         for token in token_list:
          #             if token:
          #                 splits.append(NormalizedString(token))
  
  					return splits
  
  
  
  
  
  
  
  		def 				__A      (   self		,			A  )     ->   List[str]:
  
  
  
  
  
  
  
  					'''simple docstring'''
  
  
  
  
  
  
  
  					pretok.split(self.jieba_split  )
  
  
style_context: 
  
  
  from typing import TYPE_CHECKING
  
  from ...utils import (
      OptionalDependencyNotAvailable,
      _LazyModule,
      is_flax_available,
      is_sentencepiece_available,
      is_tf_available,
      is_tokenizers_available,
      is_torch_available,
  )
  
  
  UpperCAmelCase      :						List[str]    =		{
      "configuration_big_bird": ["BIG_BIRD_PRETRAINED_CONFIG_ARCHIVE_MAP", "BigBirdConfig", "BigBirdOnnxConfig"],
  }
  
  try:
  		if not is_sentencepiece_available():
  				raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
  		pass
  else:
  		UpperCAmelCase      :						str    =		["BigBirdTokenizer"]
  
  try:
  		if not is_tokenizers_available():
  				raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
  		pass
  else:
  		UpperCAmelCase      :						str    =		["BigBirdTokenizerFast"]
  
  try:
  		if not is_torch_available():
  				raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
  		pass
  else:
  		UpperCAmelCase      :						Dict    =		[
  		    "BIG_BIRD_PRETRAINED_MODEL_ARCHIVE_LIST",
  		    "BigBirdForCausalLM",
  		    "BigBirdForMaskedLM",
  		    "BigBirdForMultipleChoice",
  		    "BigBirdForPreTraining",
  		    "BigBirdForQuestionAnswering",
  		    "BigBirdForSequenceClassification",
  		    "BigBirdForTokenClassification",
  		    "BigBirdLayer",
  		    "BigBirdModel",
  		    "BigBirdPreTrainedModel",
  		    "load_tf_weights_in_big_bird",
  		]
  
  try:
  		if not is_flax_available():
  				raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
  		pass
  else:
  		UpperCAmelCase      :						Dict    =		[
  		    "FlaxBigBirdForCausalLM",
  		    "FlaxBigBirdForMaskedLM",
  		    "FlaxBigBirdForMultipleChoice",
  		    "FlaxBigBirdForPreTraining",
  		    "FlaxBigBirdForQuestionAnswering",
  		    "FlaxBigBirdForSequenceClassification",
  		    "FlaxBigBirdForTokenClassification",
  		    "FlaxBigBirdModel",
  		    "FlaxBigBirdPreTrainedModel",
  		]
  
  if TYPE_CHECKING:
  		from .configuration_big_bird import BIG_BIRD_PRETRAINED_CONFIG_ARCHIVE_MAP, BigBirdConfig, BigBirdOnnxConfig
  
  		try:
  				if not is_sentencepiece_available():
  						raise OptionalDependencyNotAvailable()
  		except OptionalDependencyNotAvailable:
  				pass
  		else:
  				from .tokenization_big_bird import BigBirdTokenizer
  
  		try:
  				if not is_tokenizers_available():
  						raise OptionalDependencyNotAvailable()
  		except OptionalDependencyNotAvailable:
  				pass
  		else:
  				from .tokenization_big_bird_fast import BigBirdTokenizerFast
  
  		try:
  				if not is_torch_available():
  						raise OptionalDependencyNotAvailable()
  		except OptionalDependencyNotAvailable:
  				pass
  		else:
  				from .modeling_big_bird import (
  				    BIG_BIRD_PRETRAINED_MODEL_ARCHIVE_LIST,
  				    BigBirdForCausalLM,
  				    BigBirdForMaskedLM,
  				    BigBirdForMultipleChoice,
  				    BigBirdForPreTraining,
  				    BigBirdForQuestionAnswering,
  				    BigBirdForSequenceClassification,
  				    BigBirdForTokenClassification,
  				    BigBirdLayer,
  				    BigBirdModel,
  				    BigBirdPreTrainedModel,
  				    load_tf_weights_in_big_bird,
  				)
  
  		try:
  				if not is_flax_available():
  						raise OptionalDependencyNotAvailable()
  		except OptionalDependencyNotAvailable:
  				pass
  		else:
  				from .modeling_flax_big_bird import (
  				    FlaxBigBirdForCausalLM,
  				    FlaxBigBirdForMaskedLM,
  				    FlaxBigBirdForMultipleChoice,
  				    FlaxBigBirdForPreTraining,
  				    FlaxBigBirdForQuestionAnswering,
  				    FlaxBigBirdForSequenceClassification,
  				    FlaxBigBirdForTokenClassification,
  				    FlaxBigBirdModel,
  				    FlaxBigBirdPreTrainedModel,
  				)
  
  else:
  		import sys
  
  		UpperCAmelCase      :						Dict    =		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
  
  