





import unittest

from transformers import RoFormerTokenizer, RoFormerTokenizerFast
from transformers.testing_utils import require_rjieba, require_tokenizers

from ...test_tokenization_common import TokenizerTesterMixin

@require_rjieba
@require_tokenizers
class 		UpperCamelCase__			(				lowerCAmelCase_							,				unittest.TestCase       ):



     '''simple docstring'''

     __snake_case   :     Tuple		     =      RoFormerTokenizer
     __snake_case   :     Tuple		     =      RoFormerTokenizerFast
     __snake_case   :     str		     =      True
     __snake_case   :     Any		     =      True






     def     SCREAMING_SNAKE_CASE__  (							self						:   int	)					->		Union[str, Any]:




           '''simple docstring'''


           super().setUp()






     def     SCREAMING_SNAKE_CASE__  (							self						:   int						,**lowerCamelCase__						:   List[str]	)					->		Optional[Any]:




           '''simple docstring'''


           return self.tokenizer_class.from_pretrained("""junnyu/roformer_chinese_base"""						,**lowerCamelCase__	)






     def     SCREAMING_SNAKE_CASE__  (							self						:   Dict						,**lowerCamelCase__						:   Optional[int]	)					->		List[Any]:




           '''simple docstring'''


           return self.rust_tokenizer_class.from_pretrained("""junnyu/roformer_chinese_base"""						,**lowerCamelCase__	)






     def     SCREAMING_SNAKE_CASE__  (							self						:   int	)					->		List[str]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE		=						"""永和服装饰品有限公司,今天天气非常好"""
           SCREAMING_SNAKE_CASE		=						"""永和 服装 饰品 有限公司 , 今 天 天 气 非常 好"""
           return input_text, output_text






     def     SCREAMING_SNAKE_CASE__  (							self						:   int	)					->		str:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE		=						self.get_tokenizer()
           SCREAMING_SNAKE_CASE, SCREAMING_SNAKE_CASE		=						self.get_chinese_input_output_texts()
           SCREAMING_SNAKE_CASE		=						tokenizer.tokenize(lowerCamelCase__	)

           self.assertListEqual(lowerCamelCase__						,output_text.split()	)

           SCREAMING_SNAKE_CASE		=						tokens + [tokenizer.unk_token]
           SCREAMING_SNAKE_CASE		=						[22943, 21332, 34431, 45904, 117, 306, 1231, 1231, 2653, 33994, 1266, 100]
           self.assertListEqual(tokenizer.convert_tokens_to_ids(lowerCamelCase__	)						,lowerCamelCase__	)






     def     SCREAMING_SNAKE_CASE__  (							self						:   Dict	)					->		Optional[Any]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE		=						self.get_rust_tokenizer()
           SCREAMING_SNAKE_CASE, SCREAMING_SNAKE_CASE		=						self.get_chinese_input_output_texts()
           SCREAMING_SNAKE_CASE		=						tokenizer.tokenize(lowerCamelCase__	)
           self.assertListEqual(lowerCamelCase__						,output_text.split()	)
           SCREAMING_SNAKE_CASE		=						tokens + [tokenizer.unk_token]
           SCREAMING_SNAKE_CASE		=						[22943, 21332, 34431, 45904, 117, 306, 1231, 1231, 2653, 33994, 1266, 100]
           self.assertListEqual(tokenizer.convert_tokens_to_ids(lowerCamelCase__	)						,lowerCamelCase__	)






     def     SCREAMING_SNAKE_CASE__  (							self						:   Union[str, Any]	)					->		int:




           '''simple docstring'''


           pass






     def     SCREAMING_SNAKE_CASE__  (							self						:   List[str]	)					->		Dict:




           '''simple docstring'''


           pass






     def     SCREAMING_SNAKE_CASE__  (							self						:   Any	)					->		int:




           '''simple docstring'''


           pass













from __future__ import annotations

import math



def        __lowercase       (				_SCREAMING_SNAKE_CASE     )			->       bool:


      '''simple docstring'''


      if 1 < number < 4:
            # 2 and 3 are primes
            return True
      elif number < 2 or number % 2 == 0 or number % 3 == 0:
            # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
            return False

      # All primes number are in format of 6k +/- 1
      for i in range(5			,						int(math.sqrt(_SCREAMING_SNAKE_CASE     ) + 1     )			,						6     ):
            if number % i == 0 or number % (i + 2) == 0:
                  return False
      return True



def        __lowercase       (				_SCREAMING_SNAKE_CASE     )			->       list[int]:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						str(_SCREAMING_SNAKE_CASE     )
      SCREAMING_SNAKE_CASE		=						[n]
      for i in range(1			,						len(_SCREAMING_SNAKE_CASE     )     ):
            list_nums.append(int(str_num[i:]     )     )
            list_nums.append(int(str_num[:-i]     )     )
      return list_nums



def        __lowercase       (				_SCREAMING_SNAKE_CASE     )			->       bool:


      '''simple docstring'''


      if len(str(_SCREAMING_SNAKE_CASE     )     ) > 3:
            if not is_prime(int(str(_SCREAMING_SNAKE_CASE     )[-3:]     )     ) or not is_prime(int(str(_SCREAMING_SNAKE_CASE     )[:3]     )     ):
                  return False
      return True



def        __lowercase       (				_SCREAMING_SNAKE_CASE = 11     )			->       list[int]:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						[]
      SCREAMING_SNAKE_CASE		=						13
      while len(_SCREAMING_SNAKE_CASE     ) != count:
            if validate(_SCREAMING_SNAKE_CASE     ):
                  SCREAMING_SNAKE_CASE		=						list_truncated_nums(_SCREAMING_SNAKE_CASE     )
                  if all(is_prime(_SCREAMING_SNAKE_CASE     ) for i in list_nums     ):
                        list_truncated_primes.append(_SCREAMING_SNAKE_CASE     )
            num += 2
      return list_truncated_primes



def        __lowercase       (				)			->       int:


      '''simple docstring'''


      return sum(compute_truncated_primes(11     )     )


if __name__ == "__main__":
      print(F'''{sum(compute_truncated_primes(1_1)) = }''')


