
"""simple docstring"""


import os
import unittest

from transformers.models.bartpho.tokenization_bartpho import VOCAB_FILES_NAMES, BartphoTokenizer
from transformers.testing_utils import get_tests_dir

from ...test_tokenization_common import TokenizerTesterMixin


_lowercase							      = get_tests_dir('''fixtures/test_sentencepiece_bpe.model''')







class  lowerCAmelCase_ (					_lowercase						,    unittest.TestCase			):



						'''simple docstring'''


						_lowerCamelCase:			List[str]					=			BartphoTokenizer
						_lowerCamelCase:			Tuple					=			False
						_lowerCamelCase:			Optional[int]					=			True


						def   _SCREAMING_SNAKE_CASE					(       self   :					Any					)   ->      Optional[int]:
							super().setUp()

							A        =      ['▁This', '▁is', '▁a', '▁t', 'est']
							A        =      dict(zip(A_     ,range(len(A_					)					)					)					)
							A        =      {'unk_token': '<unk>'}

							A        =      os.path.join(self.tmpdirname     ,VOCAB_FILES_NAMES['monolingual_vocab_file']					)
							with open(self.monolingual_vocab_file     ,'w'     ,encoding='utf-8'					) as fp:
								for token in vocab_tokens:
									fp.write(F'{token} {vocab_tokens[token]}\n'					)

							A        =      BartphoTokenizer(A_     ,self.monolingual_vocab_file     ,**self.special_tokens_map					)
							tokenizer.save_pretrained(self.tmpdirname					)


						def   _SCREAMING_SNAKE_CASE					(       self   :					Any     ,**A_   :					List[str]					)   ->      List[Any]:
							kwargs.update(self.special_tokens_map					)
							return BartphoTokenizer.from_pretrained(self.tmpdirname     ,**A_					)


						def   _SCREAMING_SNAKE_CASE					(       self   :					List[Any]     ,A_   :					Any					)   ->      str:
							A        =      'This is a là test'
							A        =      'This is a<unk><unk> test'
							return input_text, output_text




						def   _SCREAMING_SNAKE_CASE					(       self   :					Optional[Any]					)   ->      Dict:
							A        =      BartphoTokenizer(A_     ,self.monolingual_vocab_file     ,**self.special_tokens_map					)
							A        =      'This is a là test'
							A        =      '▁This ▁is ▁a ▁l à ▁t est'.split()
							A        =      tokenizer.tokenize(A_					)
							self.assertListEqual(A_     ,A_					)

							A        =      tokens + [tokenizer.unk_token]
							A        =      [4, 5, 6, 3, 3, 7, 8, 3]
							self.assertListEqual(tokenizer.convert_tokens_to_ids(A_					)     ,A_					)



"""simple docstring"""


def _lowerCamelCase	(		):

			'''simple docstring'''




			__lowerCAmelCase				    =			[]
			__lowerCAmelCase				    =			1

			while len(_UpperCamelCase      ) < 1e6:
						constant.append(str(_UpperCamelCase      )      )
						i += 1

			__lowerCAmelCase				    =			"".join(_UpperCamelCase      )

			return (
			    int(constant[0]      )
			    * int(constant[9]      )
			    * int(constant[99]      )
			    * int(constant[999]      )
			    * int(constant[9999]      )
			    * int(constant[9_9999]      )
			    * int(constant[99_9999]      )
			)


if __name__ == "__main__":
	print(solution())




