

'''simple docstring'''



import unittest

from transformers import DebertaVaTokenizer, DebertaVaTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin


__lowercase     :						Optional[int]	=     get_tests_dir('fixtures/spiece.model')





@require_sentencepiece
@require_tokenizers
class 							__UpperCamelCase    (		_a		,				unittest.TestCase ):
	A_           =   DebertaVaTokenizer
	A_           =   DebertaVaTokenizerFast
	A_           =   True
	A_           =   True




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						super().setUp()

						# We have a SentencePiece fixture for testing
						__a      :	List[str]    =  DebertaVaTokenizer(__a						,    unk_token='<unk>'							)
						tokenizer.save_pretrained(self.tmpdirname							)




	def 				__UpperCAmelCase							(       self						,    __a							):

						'''simple docstring'''





						__a      :	Union[str, Any]    =  'this is a test'
						__a      :	int    =  'this is a test'
						return input_text, output_text




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	Union[str, Any]    =  '<pad>'
						__a      :	Tuple    =  0

						self.assertEqual(self.get_tokenizer()._convert_token_to_id(__a							)						,    __a							)
						self.assertEqual(self.get_tokenizer()._convert_id_to_token(__a							)						,    __a							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	List[Any]    =  list(self.get_tokenizer().get_vocab().keys()							)
						self.assertEqual(vocab_keys[0]						,    '<pad>'							)
						self.assertEqual(vocab_keys[1]						,    '<unk>'							)
						self.assertEqual(vocab_keys[-1]						,    '[PAD]'							)
						self.assertEqual(len(__a							)						,    3_0001							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						self.assertEqual(self.get_tokenizer().vocab_size						,    3_0000							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	Union[str, Any]    =  ' \tHeLLo!how  \n Are yoU?  '
						__a      :	str    =  ['▁hello', '!', 'how', '▁are', '▁you', '?']
						# fmt: on

						__a      :	Union[str, Any]    =  DebertaVaTokenizer(__a						,    do_lower_case=__a							)
						__a      :	Any    =  tokenizer.convert_ids_to_tokens(tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)

						__a      :	Dict    =  DebertaVaTokenizerFast(__a						,    do_lower_case=__a							)
						__a      :	Optional[int]    =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)




	@unittest.skip('There is an inconsistency between slow and fast tokenizer due to a bug in the fast one.'							)
	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						pass




	@unittest.skip('There is an inconsistency between slow and fast tokenizer due to a bug in the fast one.'							)
	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						pass




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	Tuple    =  'I was born in 92000, and this is falsé.'
						__a      :	Optional[int]    =  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
						# fmt: on

						__a      :	List[Any]    =  DebertaVaTokenizer(__a						,    split_by_punct=__a							)
						__a      :	Union[str, Any]    =  tokenizer.convert_ids_to_tokens(tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)

						__a      :	Optional[int]    =  DebertaVaTokenizerFast(__a						,    split_by_punct=__a							)
						__a      :	Dict    =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	Tuple    =  'I was born in 92000, and this is falsé.'
						__a      :	Any    =  ['▁i', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
						# fmt: on

						__a      :	Optional[int]    =  DebertaVaTokenizer(__a						,    do_lower_case=__a						,    split_by_punct=__a							)
						__a      :	List[str]    =  tokenizer.convert_ids_to_tokens(tokenizer.encode(__a						,    add_special_tokens=__a							)							)
						self.assertListEqual(__a						,    __a							)

						__a      :	List[str]    =  DebertaVaTokenizerFast(__a						,    do_lower_case=__a						,    split_by_punct=__a							)
						__a      :	Tuple    =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(__a						,    add_special_tokens=__a							)							)
						self.assertListEqual(__a						,    __a							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	str    =  'I was born in 92000, and this is falsé.'
						__a      :	List[Any]    =  ['▁i', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '.', ]
						# fmt: on

						__a      :	str    =  DebertaVaTokenizer(__a						,    do_lower_case=__a						,    split_by_punct=__a							)
						__a      :	List[str]    =  tokenizer.convert_ids_to_tokens(tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)

						__a      :	Dict    =  DebertaVaTokenizerFast(__a						,    do_lower_case=__a						,    split_by_punct=__a							)
						__a      :	Tuple    =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	List[Any]    =  'I was born in 92000, and this is falsé.'
						__a      :	Optional[Any]    =  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
						# fmt: on

						__a      :	str    =  DebertaVaTokenizer(__a						,    do_lower_case=__a						,    split_by_punct=__a							)
						__a      :	str    =  tokenizer.convert_ids_to_tokens(tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)

						__a      :	Tuple    =  DebertaVaTokenizerFast(__a						,    do_lower_case=__a						,    split_by_punct=__a							)
						__a      :	str    =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	str    =  ' \tHeLLo!how  \n Are yoU?  '
						__a      :	int    =  ['▁', '<unk>', 'e', '<unk>', 'o', '!', 'how', '▁', '<unk>', 're', '▁yo', '<unk>', '?']
						# fmt: on

						__a      :	Union[str, Any]    =  DebertaVaTokenizer(__a						,    do_lower_case=__a						,    split_by_punct=__a							)
						__a      :	Tuple    =  tokenizer.convert_ids_to_tokens(tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)

						__a      :	List[Any]    =  DebertaVaTokenizerFast(__a						,    do_lower_case=__a						,    split_by_punct=__a							)
						__a      :	List[str]    =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(__a						,    add_special_tokens=__a							)							)

						self.assertListEqual(__a						,    __a							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	List[Any]    =  self.get_tokenizer()
						__a      :	List[Any]    =  self.get_rust_tokenizer()

						__a      :	List[str]    =  'I was born in 92000, and this is falsé.'

						__a      :	Optional[int]    =  tokenizer.convert_ids_to_tokens(tokenizer.encode(__a						,    add_special_tokens=__a							)							)
						__a      :	List[Any]    =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(__a						,    add_special_tokens=__a							)							)
						self.assertListEqual(__a						,    __a							)

						__a      :	Union[str, Any]    =  tokenizer.encode(__a						,    add_special_tokens=__a							)
						__a      :	Dict    =  rust_tokenizer.encode(__a						,    add_special_tokens=__a							)
						self.assertListEqual(__a						,    __a							)

						__a      :	Optional[Any]    =  self.get_rust_tokenizer()
						__a      :	List[str]    =  tokenizer.encode(__a							)
						__a      :	Tuple    =  rust_tokenizer.encode(__a							)
						self.assertListEqual(__a						,    __a							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	Union[str, Any]    =  'This is a test'
						__a      :	Tuple    =  [13, 1, 4398, 25, 21, 1289]
						__a      :	List[Any]    =  ['▁', 'T', 'his', '▁is', '▁a', '▁test']
						__a      :	Union[str, Any]    =  ['▁', '<unk>', 'his', '▁is', '▁a', '▁test']

						__a      :	Dict    =  DebertaVaTokenizer(__a						,    keep_accents=__a							)
						__a      :	Optional[int]    =  DebertaVaTokenizerFast(__a						,    keep_accents=__a							)

						__a      :	Union[str, Any]    =  tokenizer.encode(__a						,    add_special_tokens=__a							)
						self.assertListEqual(__a						,    __a							)
						__a      :	int    =  tokenizer.tokenize(__a							)
						self.assertListEqual(__a						,    __a							)
						__a      :	Dict    =  tokenizer.convert_ids_to_tokens(__a							)
						self.assertListEqual(__a						,    __a							)

						__a      :	List[str]    =  rust_tokenizer.encode(__a						,    add_special_tokens=__a							)
						self.assertListEqual(__a						,    __a							)
						__a      :	List[Any]    =  rust_tokenizer.tokenize(__a							)
						self.assertListEqual(__a						,    __a							)
						__a      :	List[str]    =  rust_tokenizer.convert_ids_to_tokens(__a							)
						self.assertListEqual(__a						,    __a							)

						# fmt: off
						__a      :	Any    =  'I was born in 92000, and this is falsé.'
						__a      :	int    =  [13, 1, 23, 386, 19, 561, 3050, 15, 17, 48, 25, 8256, 18, 1, 9]
						__a      :	Tuple    =  ['▁', 'I', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', 'é', '.', ]
						__a      :	Dict    =  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '.', ]
						# fmt: on

						__a      :	Tuple    =  tokenizer.encode(__a						,    add_special_tokens=__a							)
						self.assertListEqual(__a						,    __a							)
						__a      :	int    =  tokenizer.tokenize(__a							)
						self.assertListEqual(__a						,    __a							)
						__a      :	Optional[Any]    =  tokenizer.convert_ids_to_tokens(__a							)
						self.assertListEqual(__a						,    __a							)

						__a      :	List[str]    =  rust_tokenizer.encode(__a						,    add_special_tokens=__a							)
						self.assertListEqual(__a						,    __a							)
						__a      :	List[Any]    =  rust_tokenizer.tokenize(__a							)
						self.assertListEqual(__a						,    __a							)
						__a      :	int    =  rust_tokenizer.convert_ids_to_tokens(__a							)
						self.assertListEqual(__a						,    __a							)




	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	Optional[int]    =  DebertaVaTokenizer(__a							)

						__a      :	Any    =  tokenizer.encode('sequence builders'							)
						__a      :	Optional[Any]    =  tokenizer.encode('multi-sequence build'							)

						__a      :	Dict    =  tokenizer.build_inputs_with_special_tokens(__a							)
						__a      :	List[str]    =  tokenizer.build_inputs_with_special_tokens(__a						,    __a							)

						self.assertEqual([tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]						,    __a							)
						self.assertEqual(
						    [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [tokenizer.sep_token_id]						,    __a						,    )





	@slow
	def 				__UpperCAmelCase							(       self							):

						'''simple docstring'''





						__a      :	List[Any]    =  {'input_ids': [[1, 3_9867, 36, 1_9390, 486, 27, 3_5052, 8_1436, 18, 6_0685, 1225, 7, 3_5052, 8_1436, 18, 9367, 1_6899, 18, 1_5937, 53, 594, 773, 18, 1_6287, 3_0465, 36, 1_5937, 6, 4_1139, 38, 3_6979, 6_0763, 191, 6, 3_4132, 99, 6, 5_0538, 390, 4_3230, 6, 3_4132, 2779, 2_0850, 14, 699, 1072, 1194, 36, 382, 1_0901, 53, 7, 699, 1072, 2084, 36, 2_0422, 630, 53, 19, 105, 3049, 1896, 1053, 1_6899, 1506, 11, 3_7978, 4243, 7, 1237, 3_1869, 200, 1_6566, 654, 6, 3_5052, 8_1436, 7, 5_5630, 1_3593, 4, 2], [1, 26, 1_5011, 13, 667, 8, 1053, 18, 2_3611, 1237, 7_2356, 1_2820, 34, 10_4134, 1209, 35, 1_3313, 6627, 21, 202, 347, 7, 164, 2399, 11, 46, 4485, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], 'attention_mask': [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}  # noqa: E501
						# fmt: on

						self.tokenizer_integration_test_util(
						    expected_encoding=__a						,    model_name='microsoft/deberta-v2-xlarge'						,    revision='ad6e42c1532ddf3a15c39246b63f5559d558b670'						,    )







'''simple docstring'''



import sys

__lowercase     :						Union[str, Any]	=     (
    '73167176531330624919225119674426574742355349194934'
    '96983520312774506326239578318016984801869478851843'
    '85861560789112949495459501737958331952853208805511'
    '12540698747158523863050715693290963295227443043557'
    '66896648950445244523161731856403098711121722383113'
    '62229893423380308135336276614282806444486645238749'
    '30358907296290491560440772390713810515859307960866'
    '70172427121883998797908792274921901699720888093776'
    '65727333001053367881220235421809751254540594752243'
    '52584907711670556013604839586446706324415722155397'
    '53697817977846174064955149290862569321978468622482'
    '83972241375657056057490261407972968652414535100474'
    '82166370484403199890008895243450658541227588666881'
    '16427171479924442928230863465674813919123162824586'
    '17866458359124566529476545682848912883142607690042'
    '24219022671055626321111109370544217506941658960408'
    '07198403850962455444362981230987879927244284909188'
    '84580156166097919133875499200524063689912560717606'
    '05886116467109405077541002256983155200055935729725'
    '71636269561882670428252483600823257530420752963450'
)






def   lowerCamelCase							(_SCREAMING_SNAKE_CASE				:       str       ):
					__a      :	List[str]    =  1
					for digit in s:
										product *= int(_SCREAMING_SNAKE_CASE       )
					return product






def   lowerCamelCase							(_SCREAMING_SNAKE_CASE				:       str = N       ):
					__a      :	Optional[int]    =  -sys.maxsize - 1
					__a      :	Optional[Any]    =  n[:13]
					__a      :	int    =  13
					while cur_index < len(_SCREAMING_SNAKE_CASE       ) - 13:
										if int(n[cur_index]       ) >= int(substr[0]       ):
															__a      :	List[Any]    =  substr[1:] + n[cur_index]
															cur_index += 1
										else:
															__a      :	Dict    =  max(_SCREAMING_SNAKE_CASE						,				str_eval(_SCREAMING_SNAKE_CASE       )       )
															__a      :	Optional[Any]    =  n[cur_index : cur_index + 13]
															cur_index += 13
					return largest_product


if __name__ == "__main__":
	print(f'''{solution() = }''')



