


"""simple docstring"""
import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_convbert import ConvBertTokenizer


__SCREAMING_SNAKE_CASE							:    Any		=    logging.get_logger(__name__)

__SCREAMING_SNAKE_CASE							:    Tuple		=    {'vocab_file': 'vocab.txt'}

__SCREAMING_SNAKE_CASE							:    Any		=    {
    'vocab_file': {
        'YituTech/conv-bert-base': 'https://huggingface.co/YituTech/conv-bert-base/resolve/main/vocab.txt',
        'YituTech/conv-bert-medium-small': (
            'https://huggingface.co/YituTech/conv-bert-medium-small/resolve/main/vocab.txt'
        ),
        'YituTech/conv-bert-small': 'https://huggingface.co/YituTech/conv-bert-small/resolve/main/vocab.txt',
    }
}

__SCREAMING_SNAKE_CASE							:    int		=    {
    'YituTech/conv-bert-base': 512,
    'YituTech/conv-bert-medium-small': 512,
    'YituTech/conv-bert-small': 512,
}


__SCREAMING_SNAKE_CASE							:    int		=    {
    'YituTech/conv-bert-base': {'do_lower_case': True},
    'YituTech/conv-bert-medium-small': {'do_lower_case': True},
    'YituTech/conv-bert-small': {'do_lower_case': True},
}





class      __A     (snake_case__):





							'''simple docstring'''

							__lowercase:		Tuple							      =    VOCAB_FILES_NAMES
							__lowercase:		int							      =    PRETRAINED_VOCAB_FILES_MAP
							__lowercase:		Dict							      =    PRETRAINED_INIT_CONFIGURATION
							__lowercase:		Dict							      =    PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
							__lowercase:		Dict							      =    ConvBertTokenizer



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



														"""simple docstring"""



														super().__init__(
														    UpperCAmelCase_		,       tokenizer_file=UpperCAmelCase_		,       do_lower_case=UpperCAmelCase_		,       unk_token=UpperCAmelCase_		,       sep_token=UpperCAmelCase_		,       pad_token=UpperCAmelCase_		,       cls_token=UpperCAmelCase_		,       mask_token=UpperCAmelCase_		,       tokenize_chinese_chars=UpperCAmelCase_		,       strip_accents=UpperCAmelCase_		,       **UpperCAmelCase_		,       )

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

														snake_case_           =		do_lower_case



							def 		lowerCAmelCase       (				self							:      Optional[int]		,       UpperCAmelCase_							:      Optional[Any]		,       UpperCAmelCase_							:      int=None       )					->List[Any]:



														"""simple docstring"""



														snake_case_           =		[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 		lowerCAmelCase       (				self							:      Optional[int]		,       UpperCAmelCase_							:      List[int]		,       UpperCAmelCase_							:      Optional[List[int]] = None       )					->List[int]:



														"""simple docstring"""



														snake_case_           =		[self.sep_token_id]
														snake_case_           =		[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 		lowerCAmelCase       (				self							:      str		,       UpperCAmelCase_							:      str		,       UpperCAmelCase_							:      Optional[str] = None       )					->Tuple[str]:



														"""simple docstring"""



														snake_case_           =		self._tokenizer.model.save(UpperCAmelCase_		,       name=UpperCAmelCase_       )
														return tuple(UpperCAmelCase_       )







"""simple docstring"""
from math import factorial







def 						_a				(      _SCREAMING_SNAKE_CASE = 20				)    ->				int:
							snake_case_           =		2 * n  # middle entry of odd rows starting at row 3 is the solution for n = 1,
							# 2, 3,...
							snake_case_           =		n // 2

							return int(factorial(_SCREAMING_SNAKE_CASE				) / (factorial(_SCREAMING_SNAKE_CASE				) * factorial(n - k				))				)


if __name__ == "__main__":
				import sys

				if len(sys.argv) == 1:
								print(solution(20))
				else:
								try:
												__SCREAMING_SNAKE_CASE							:    Optional[int]		=    int(sys.argv[1])
												print(solution(n))
								except ValueError:
												print('Invalid entry - please enter a number.')



