

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


a		=logging.get_logger(__name__)

a		={"""vocab_file""": """vocab.txt"""}

a		={
    """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""",
    }
}

a		={
    """YituTech/conv-bert-base""": 512,
    """YituTech/conv-bert-medium-small""": 512,
    """YituTech/conv-bert-small""": 512,
}


a		={
    """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_		(       SCREAMING_SNAKE_CASE				):
							_UpperCAmelCase    :  Dict						      =      VOCAB_FILES_NAMES
							_UpperCAmelCase    :  int						      =      PRETRAINED_VOCAB_FILES_MAP
							_UpperCAmelCase    :  List[Any]						      =      PRETRAINED_INIT_CONFIGURATION
							_UpperCAmelCase    :  Optional[int]						      =      PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
							_UpperCAmelCase    :  Optional[int]						      =      ConvBertTokenizer
							def __init__(		self		:			Union[str, Any]   ,SCREAMING_SNAKE_CASE__		:			Dict=None   ,SCREAMING_SNAKE_CASE__		:			Union[str, Any]=None   ,SCREAMING_SNAKE_CASE__		:			Optional[Any]=True   ,SCREAMING_SNAKE_CASE__		:			List[str]="[UNK]"   ,SCREAMING_SNAKE_CASE__		:			Optional[Any]="[SEP]"   ,SCREAMING_SNAKE_CASE__		:			Optional[Any]="[PAD]"   ,SCREAMING_SNAKE_CASE__		:			Optional[int]="[CLS]"   ,SCREAMING_SNAKE_CASE__		:			Tuple="[MASK]"   ,SCREAMING_SNAKE_CASE__		:			Union[str, Any]=True   ,SCREAMING_SNAKE_CASE__		:			Tuple=None   ,**SCREAMING_SNAKE_CASE__		:			Union[str, Any]   ,):
								super().__init__(
								    SCREAMING_SNAKE_CASE__   ,tokenizer_file=SCREAMING_SNAKE_CASE__   ,do_lower_case=SCREAMING_SNAKE_CASE__   ,unk_token=SCREAMING_SNAKE_CASE__   ,sep_token=SCREAMING_SNAKE_CASE__   ,pad_token=SCREAMING_SNAKE_CASE__   ,cls_token=SCREAMING_SNAKE_CASE__   ,mask_token=SCREAMING_SNAKE_CASE__   ,tokenize_chinese_chars=SCREAMING_SNAKE_CASE__   ,strip_accents=SCREAMING_SNAKE_CASE__   ,**SCREAMING_SNAKE_CASE__   ,)

								__lowerCamelCase				:				Dict					       = json.loads(self.backend_tokenizer.normalizer.__getstate__())
								if (
								    normalizer_state.get('lowercase'   ,SCREAMING_SNAKE_CASE__) != do_lower_case
								    or normalizer_state.get('strip_accents'   ,SCREAMING_SNAKE_CASE__) != strip_accents
								    or normalizer_state.get('handle_chinese_chars'   ,SCREAMING_SNAKE_CASE__) != tokenize_chinese_chars
								):
									__lowerCamelCase				:				Union[str, Any]					       = getattr(SCREAMING_SNAKE_CASE__   ,normalizer_state.pop('type'))
									__lowerCamelCase				:				Optional[int]					       = do_lower_case
									__lowerCamelCase				:				List[str]					       = strip_accents
									__lowerCamelCase				:				Optional[int]					       = tokenize_chinese_chars
									__lowerCamelCase				:				List[Any]					       = normalizer_class(**SCREAMING_SNAKE_CASE__)

								__lowerCamelCase				:				List[str]					       = do_lower_case
							def     lowerCAmelCase     (		self		:			List[Any]   ,SCREAMING_SNAKE_CASE__		:			List[Any]   ,SCREAMING_SNAKE_CASE__		:			List[Any]=None):
								__lowerCamelCase				:				Optional[Any]					       = [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[Any]   ,SCREAMING_SNAKE_CASE__		:			List[int]   ,SCREAMING_SNAKE_CASE__		:			Optional[List[int]] = None):
								__lowerCamelCase				:				str					       = [self.sep_token_id]
								__lowerCamelCase				:				Any					       = [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		:			int   ,SCREAMING_SNAKE_CASE__		:			str   ,SCREAMING_SNAKE_CASE__		:			Optional[str] = None):
								__lowerCamelCase				:				Any					       = self._tokenizer.model.save(SCREAMING_SNAKE_CASE__   ,name=SCREAMING_SNAKE_CASE__)
								return tuple(SCREAMING_SNAKE_CASE__)











def  _SCREAMING_SNAKE_CASE				(   a  )      ->      bool:
					return str(a  ) == str(a  )[::-1]







def  _SCREAMING_SNAKE_CASE				(   a  )      ->      int:
					return int(a  ) + int(str(a  )[::-1]  )







def  _SCREAMING_SNAKE_CASE				(   a = 1_00_00  )      ->      int:
					__A	:						int       =				[]
					for num in range(1					,						a  ):
										__A	:						List[str]       =				0
										__A	:						List[Any]       =				num
										while iterations < 50:
															__A	:						str       =				sum_reverse(a  )
															iterations += 1
															if is_palindrome(a  ):
																				break
										else:
															lychrel_nums.append(a  )
					return len(a  )


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




