





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


SCREAMING_SNAKE_CASE_   :      List[Any]			=   logging.get_logger(__name__)

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

SCREAMING_SNAKE_CASE_   :      str			=   {
    '''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'''
        ),
    },
}

SCREAMING_SNAKE_CASE_   :      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,
}


SCREAMING_SNAKE_CASE_   :      int			=   {
    '''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'''
	__UpperCamelCase   =		VOCAB_FILES_NAMES
	__UpperCamelCase   =		PRETRAINED_VOCAB_FILES_MAP
	__UpperCamelCase   =		PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
	__UpperCamelCase   =		PRETRAINED_INIT_CONFIGURATION
	__UpperCamelCase   =		['''input_ids''', '''attention_mask''']
	__UpperCamelCase   =		DistilBertTokenizer




	def __init__(						self							:     int					,      __lowerCamelCase							:     Optional[int]=None					,      __lowerCamelCase							:     Optional[Any]=None					,      __lowerCamelCase							:     Union[str, Any]=True					,      __lowerCamelCase							:     Union[str, Any]="[UNK]"					,      __lowerCamelCase							:     List[str]="[SEP]"					,      __lowerCamelCase							:     Any="[PAD]"					,      __lowerCamelCase							:     Optional[int]="[CLS]"					,      __lowerCamelCase							:     Any="[MASK]"					,      __lowerCamelCase							:     List[Any]=True					,      __lowerCamelCase							:     Optional[Any]=None					,      **__lowerCamelCase							:     List[Any]					,      )       -> str:

			'''simple docstring'''




			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					,      )

			__lowercase											=     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
			):
					__lowercase											=     getattr(__lowerCamelCase					,      normalizer_state.pop('type'   )   )
					__lowercase											=     do_lower_case
					__lowercase											=     strip_accents
					__lowercase											=     tokenize_chinese_chars
					__lowercase											=     normalizer_class(**__lowerCamelCase   )

			__lowercase											=     do_lower_case




	def    UpperCAmelCase			(						self							:     Union[str, Any]					,      __lowerCamelCase							:     Union[str, Any]					,      __lowerCamelCase							:     int=None   )       -> List[str]:

			'''simple docstring'''




			__lowercase											=     [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							:     List[str]					,      __lowerCamelCase							:     List[int]					,      __lowerCamelCase							:     Optional[List[int]] = None   )       -> List[int]:

			'''simple docstring'''




			__lowercase											=     [self.sep_token_id]
			__lowercase											=     [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							:     Any					,      __lowerCamelCase							:     str					,      __lowerCamelCase							:     Optional[str] = None   )       -> Tuple[str]:

			'''simple docstring'''




			__lowercase											=     self._tokenizer.model.save(__lowerCamelCase					,      name=__lowerCamelCase   )
			return tuple(__lowerCamelCase   )











from math import factorial



def  SCREAMING_SNAKE_CASE				(      snake_case						,   snake_case							)		->    int:

		# If either of the conditions are true, the function is being asked
		# to calculate a factorial of a negative number, which is not possible
		if n < k or k < 0:
				raise ValueError('Please enter positive integers for n and k where n >= k'							)
		return factorial(snake_case							) // (factorial(snake_case							) * factorial(n - k							))


if __name__ == "__main__":
		print(
		    '''The number of five-card hands possible from a standard''',
		    F"""fifty-two card deck is: {combinations(52, 5)}\n""",
		)

		print(
		    '''If a class of 40 students must be arranged into groups of''',
		    F"""4 for group projects, there are {combinations(40, 4)} ways""",
		    '''to arrange them.\n''',
		)

		print(
		    '''If 10 teams are competing in a Formula One race, there''',
		    F"""are {combinations(10, 3)} ways that first, second and""",
		    '''third place can be awarded.''',
		)




