

import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from .tokenization_electra import ElectraTokenizer


_snake_case						: Optional[int]											=							{'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

_snake_case						: Dict											=							{
    'vocab_file': {
        'google/electra-small-generator': (
            'https://huggingface.co/google/electra-small-generator/resolve/main/vocab.txt'
        ),
        'google/electra-base-generator': 'https://huggingface.co/google/electra-base-generator/resolve/main/vocab.txt',
        'google/electra-large-generator': (
            'https://huggingface.co/google/electra-large-generator/resolve/main/vocab.txt'
        ),
        'google/electra-small-discriminator': (
            'https://huggingface.co/google/electra-small-discriminator/resolve/main/vocab.txt'
        ),
        'google/electra-base-discriminator': (
            'https://huggingface.co/google/electra-base-discriminator/resolve/main/vocab.txt'
        ),
        'google/electra-large-discriminator': (
            'https://huggingface.co/google/electra-large-discriminator/resolve/main/vocab.txt'
        ),
    },
    'tokenizer_file': {
        'google/electra-small-generator': (
            'https://huggingface.co/google/electra-small-generator/resolve/main/tokenizer.json'
        ),
        'google/electra-base-generator': (
            'https://huggingface.co/google/electra-base-generator/resolve/main/tokenizer.json'
        ),
        'google/electra-large-generator': (
            'https://huggingface.co/google/electra-large-generator/resolve/main/tokenizer.json'
        ),
        'google/electra-small-discriminator': (
            'https://huggingface.co/google/electra-small-discriminator/resolve/main/tokenizer.json'
        ),
        'google/electra-base-discriminator': (
            'https://huggingface.co/google/electra-base-discriminator/resolve/main/tokenizer.json'
        ),
        'google/electra-large-discriminator': (
            'https://huggingface.co/google/electra-large-discriminator/resolve/main/tokenizer.json'
        ),
    },
}

_snake_case						: Union[str, Any]											=							{
    'google/electra-small-generator': 5_12,
    'google/electra-base-generator': 5_12,
    'google/electra-large-generator': 5_12,
    'google/electra-small-discriminator': 5_12,
    'google/electra-base-discriminator': 5_12,
    'google/electra-large-discriminator': 5_12,
}

_snake_case						: str											=							{
    'google/electra-small-generator': {'do_lower_case': True},
    'google/electra-base-generator': {'do_lower_case': True},
    'google/electra-large-generator': {'do_lower_case': True},
    'google/electra-small-discriminator': {'do_lower_case': True},
    'google/electra-base-discriminator': {'do_lower_case': True},
    'google/electra-large-discriminator': {'do_lower_case': True},
}





class __SCREAMING_SNAKE_CASE     (	__snake_case		):
    SCREAMING_SNAKE_CASE__      =VOCAB_FILES_NAMES
    SCREAMING_SNAKE_CASE__      =PRETRAINED_VOCAB_FILES_MAP
    SCREAMING_SNAKE_CASE__      =PRETRAINED_INIT_CONFIGURATION
    SCREAMING_SNAKE_CASE__      =PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
    SCREAMING_SNAKE_CASE__      =ElectraTokenizer






    def __init__(       self,		_a=None,		_a=None,		_a=True,		_a="[UNK]",		_a="[SEP]",		_a="[PAD]",		_a="[CLS]",		_a="[MASK]",		_a=True,		_a=None,		**_a,		)   ->					Any:
       super().__init__(
           _a,		tokenizer_file=_a,		do_lower_case=_a,		unk_token=_a,		sep_token=_a,		pad_token=_a,		cls_token=_a,		mask_token=_a,		tokenize_chinese_chars=_a,		strip_accents=_a,		**_a,		)

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

       __SCREAMING_SNAKE_CASE       =				do_lower_case






    def 						__lowerCAmelCase    (       self,		_a,		_a=None )   ->					int:
       __SCREAMING_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,		_a,		_a = None )   ->					Union[str, Any]:
       __SCREAMING_SNAKE_CASE       =				[self.sep_token_id]
       __SCREAMING_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,		_a,		_a = None )   ->					Optional[int]:
       __SCREAMING_SNAKE_CASE       =				self._tokenizer.model.save(_a,		name=_a )
       return tuple(_a )





"""simple docstring"""



def      UpperCAmelCase     (       _lowercase :   int = 1_0_0_0	)						-> int:


	"""simple docstring"""




	lowerCAmelCase_							,	lowerCAmelCase_      							=			1, 1
	lowerCAmelCase_      							=			[]
	for i in range(1			,   n + 1	):
		lowerCAmelCase_      							=			prev_numerator + 2 * prev_denominator
		lowerCAmelCase_      							=			prev_numerator + prev_denominator
		if len(str(_lowercase	)	) > len(str(_lowercase	)	):
			result.append(_lowercase	)
		lowerCAmelCase_      							=			numerator
		lowerCAmelCase_      							=			denominator

	return len(_lowercase	)


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