




import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_distilbert import DistilBertTokenizer


__lowerCAmelCase	:       Union[str, Any]     =	logging.get_logger(__name__)

__lowerCAmelCase	:       List[Any]     =	{'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

__lowerCAmelCase	:       Optional[Any]     =	{
    'vocab_file': {
        'distilbert-base-uncased': 'https://huggingface.co/distilbert-base-uncased/resolve/main/vocab.txt',
        'distilbert-base-uncased-distilled-squad': (
            'https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/vocab.txt'
        ),
        'distilbert-base-cased': 'https://huggingface.co/distilbert-base-cased/resolve/main/vocab.txt',
        'distilbert-base-cased-distilled-squad': (
            'https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/vocab.txt'
        ),
        'distilbert-base-german-cased': 'https://huggingface.co/distilbert-base-german-cased/resolve/main/vocab.txt',
        'distilbert-base-multilingual-cased': (
            'https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/vocab.txt'
        ),
    },
    'tokenizer_file': {
        'distilbert-base-uncased': 'https://huggingface.co/distilbert-base-uncased/resolve/main/tokenizer.json',
        'distilbert-base-uncased-distilled-squad': (
            'https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/tokenizer.json'
        ),
        'distilbert-base-cased': 'https://huggingface.co/distilbert-base-cased/resolve/main/tokenizer.json',
        'distilbert-base-cased-distilled-squad': (
            'https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/tokenizer.json'
        ),
        'distilbert-base-german-cased': (
            'https://huggingface.co/distilbert-base-german-cased/resolve/main/tokenizer.json'
        ),
        'distilbert-base-multilingual-cased': (
            'https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/tokenizer.json'
        ),
    },
}

__lowerCAmelCase	:       Optional[int]     =	{
    'distilbert-base-uncased': 512,
    'distilbert-base-uncased-distilled-squad': 512,
    'distilbert-base-cased': 512,
    'distilbert-base-cased-distilled-squad': 512,
    'distilbert-base-german-cased': 512,
    'distilbert-base-multilingual-cased': 512,
}


__lowerCAmelCase	:       List[str]     =	{
    'distilbert-base-uncased': {'do_lower_case': True},
    'distilbert-base-uncased-distilled-squad': {'do_lower_case': True},
    'distilbert-base-cased': {'do_lower_case': False},
    'distilbert-base-cased-distilled-squad': {'do_lower_case': False},
    'distilbert-base-german-cased': {'do_lower_case': False},
    'distilbert-base-multilingual-cased': {'do_lower_case': False},
}




class 					snake_case__							(_UpperCamelCase     ):
				"""simple docstring"""



				SCREAMING_SNAKE_CASE_ :							List[str]											=      VOCAB_FILES_NAMES
				SCREAMING_SNAKE_CASE_ :							int											=      PRETRAINED_VOCAB_FILES_MAP
				SCREAMING_SNAKE_CASE_ :							Dict											=      PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
				SCREAMING_SNAKE_CASE_ :							Tuple											=      PRETRAINED_INIT_CONFIGURATION
				SCREAMING_SNAKE_CASE_ :							Optional[int]											=      ["""input_ids""", """attention_mask"""]
				SCREAMING_SNAKE_CASE_ :							str											=      DistilBertTokenizer





				def __init__(   self       :  Union[str, Any]      ,   __lowerCamelCase       :  Dict=None      ,   __lowerCamelCase       :  Optional[int]=None      ,   __lowerCamelCase       :  str=True      ,   __lowerCamelCase       :  List[str]="[UNK]"      ,   __lowerCamelCase       :  str="[SEP]"      ,   __lowerCamelCase       :  Tuple="[PAD]"      ,   __lowerCamelCase       :  List[str]="[CLS]"      ,   __lowerCamelCase       :  int="[MASK]"      ,   __lowerCamelCase       :  Optional[int]=True      ,   __lowerCamelCase       :  Any=None      ,   **__lowerCamelCase       :  str      ,   )      ->  List[str]:
							super().__init__(
							    __lowerCamelCase      ,   tokenizer_file=__lowerCamelCase      ,   do_lower_case=__lowerCamelCase      ,   unk_token=__lowerCamelCase      ,   sep_token=__lowerCamelCase      ,   pad_token=__lowerCamelCase      ,   cls_token=__lowerCamelCase      ,   mask_token=__lowerCamelCase      ,   tokenize_chinese_chars=__lowerCamelCase      ,   strip_accents=__lowerCamelCase      ,   **__lowerCamelCase      ,   )

							a					=    json.loads(self.backend_tokenizer.normalizer.__getstate__()							)
							if (
							    normalizer_state.get("lowercase"      ,   __lowerCamelCase							) != do_lower_case
							    or normalizer_state.get("strip_accents"      ,   __lowerCamelCase							) != strip_accents
							    or normalizer_state.get("handle_chinese_chars"      ,   __lowerCamelCase							) != tokenize_chinese_chars
							):
										a					=    getattr(__lowerCamelCase      ,   normalizer_state.pop("type"							)							)
										a					=    do_lower_case
										a					=    strip_accents
										a					=    tokenize_chinese_chars
										a					=    normalizer_class(**__lowerCamelCase							)

							a					=    do_lower_case





				def 							__UpperCAmelCase							(   self       :  Optional[Any]      ,   __lowerCamelCase       :  int      ,   __lowerCamelCase       :  List[Any]=None							)      ->  int:
							a					=    [self.cls_token_id] + token_ids_a + [self.sep_token_id]

							if token_ids_a:
										output += token_ids_a + [self.sep_token_id]

							return output





				def 							__UpperCAmelCase							(   self       :  Any      ,   __lowerCamelCase       :  List[int]      ,   __lowerCamelCase       :  Optional[List[int]] = None							)      ->  List[int]:
							a					=    [self.sep_token_id]
							a					=    [self.cls_token_id]
							if token_ids_a is None:
										return len(cls + token_ids_a + sep							) * [0]
							return len(cls + token_ids_a + sep							) * [0] + len(token_ids_a + sep							) * [1]





				def 							__UpperCAmelCase							(   self       :  int      ,   __lowerCamelCase       :  str      ,   __lowerCamelCase       :  Optional[str] = None							)      ->  Tuple[str]:
							a					=    self._tokenizer.model.save(__lowerCamelCase      ,   name=__lowerCamelCase							)
							return tuple(__lowerCamelCase							)












def     __magic_name__       (				A	:      int,						A	:      int,						A	:      int     ):






			'''simple docstring'''







			if exponent == 1:
						return base
			if exponent % 2 == 0:
						a					=    _modexpt(A,						exponent // 2,						A     ) % modulo_value
						return (x * x) % modulo_value
			else:
						return (base * _modexpt(A,						exponent - 1,						A     )) % modulo_value




def     __magic_name__       (				A	:      int = 1777,						A	:      int = 1855,						A	:      int = 8     ):






			'''simple docstring'''







			a					=    base
			for _ in range(1,						A     ):
						a					=    _modexpt(A,						A,						10**digits     )

			return result


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






