
"""simple docstring"""




import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

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


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

UpperCAmelCase__      :    List[Any]    							= {
    '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'
        ),
    },
}

UpperCAmelCase__      :    Optional[Any]    							= {
    'google/electra-small-generator': 5_1_2,
    'google/electra-base-generator': 5_1_2,
    'google/electra-large-generator': 5_1_2,
    'google/electra-small-discriminator': 5_1_2,
    'google/electra-base-discriminator': 5_1_2,
    'google/electra-large-discriminator': 5_1_2,
}

UpperCAmelCase__      :    Optional[Any]    							= {
    '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 	lowerCAmelCase_						(a__  ):


				"""simple docstring"""



				__UpperCamelCase      :						List[str]					       =   VOCAB_FILES_NAMES
				__UpperCamelCase      :						Tuple					       =   PRETRAINED_VOCAB_FILES_MAP
				__UpperCamelCase      :						Union[str, Any]					       =   PRETRAINED_INIT_CONFIGURATION
				__UpperCamelCase      :						Union[str, Any]					       =   PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
				__UpperCamelCase      :						Dict					       =   ElectraTokenizer



				def __init__(self   ,       SCREAMING_SNAKE_CASE__=None   ,       SCREAMING_SNAKE_CASE__=None   ,       SCREAMING_SNAKE_CASE__=True   ,       SCREAMING_SNAKE_CASE__="[UNK]"   ,       SCREAMING_SNAKE_CASE__="[SEP]"   ,       SCREAMING_SNAKE_CASE__="[PAD]"   ,       SCREAMING_SNAKE_CASE__="[CLS]"   ,       SCREAMING_SNAKE_CASE__="[MASK]"   ,       SCREAMING_SNAKE_CASE__=True   ,       SCREAMING_SNAKE_CASE__=None   ,       **SCREAMING_SNAKE_CASE__   ,       )					->		List[Any]:



											"""simple docstring"""




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

											SCREAMING_SNAKE_CASE__						:       List[str]           =   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
											):
																		SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   getattr(SCREAMING_SNAKE_CASE__   ,       normalizer_state.pop("""type"""    )    )
																		SCREAMING_SNAKE_CASE__						:       Tuple           =   do_lower_case
																		SCREAMING_SNAKE_CASE__						:       Optional[Any]           =   strip_accents
																		SCREAMING_SNAKE_CASE__						:       Any           =   tokenize_chinese_chars
																		SCREAMING_SNAKE_CASE__						:       Any           =   normalizer_class(**SCREAMING_SNAKE_CASE__    )

											SCREAMING_SNAKE_CASE__						:       int           =   do_lower_case



				def 	__magic_name__    (self   ,       SCREAMING_SNAKE_CASE__   ,       SCREAMING_SNAKE_CASE__=None    )					->		List[str]:



											"""simple docstring"""




											SCREAMING_SNAKE_CASE__						:       List[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 	__magic_name__    (self   ,       SCREAMING_SNAKE_CASE__   ,       SCREAMING_SNAKE_CASE__ = None    )					->		List[int]:



											"""simple docstring"""




											SCREAMING_SNAKE_CASE__						:       Optional[Any]           =   [self.sep_token_id]
											SCREAMING_SNAKE_CASE__						:       int           =   [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 	__magic_name__    (self   ,       SCREAMING_SNAKE_CASE__   ,       SCREAMING_SNAKE_CASE__ = None    )					->		Tuple[str]:



											"""simple docstring"""




											SCREAMING_SNAKE_CASE__						:       str           =   self._tokenizer.model.save(SCREAMING_SNAKE_CASE__   ,       name=SCREAMING_SNAKE_CASE__    )
											return tuple(SCREAMING_SNAKE_CASE__    )






"""simple docstring"""




def lowercase_  (   _snake_case						):
							SCREAMING_SNAKE_CASE__						:       Optional[int]           =   [1]

							SCREAMING_SNAKE_CASE__      ,      SCREAMING_SNAKE_CASE__      ,      SCREAMING_SNAKE_CASE__						:       str           =   0, 0, 0
							SCREAMING_SNAKE_CASE__						:       List[str]           =   ugly_nums[ia] * 2
							SCREAMING_SNAKE_CASE__						:       int           =   ugly_nums[ia] * 3
							SCREAMING_SNAKE_CASE__						:       Any           =   ugly_nums[ia] * 5

							for _ in range(1   ,_snake_case						):
														SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   min(_snake_case   ,_snake_case   ,_snake_case						)
														ugly_nums.append(_snake_case						)
														if next_num == next_a:
																					ia += 1
																					SCREAMING_SNAKE_CASE__						:       Optional[int]           =   ugly_nums[ia] * 2
														if next_num == next_a:
																					ia += 1
																					SCREAMING_SNAKE_CASE__						:       List[str]           =   ugly_nums[ia] * 3
														if next_num == next_a:
																					ia += 1
																					SCREAMING_SNAKE_CASE__						:       Tuple           =   ugly_nums[ia] * 5
							return ugly_nums[-1]


if __name__ == "__main__":
					from doctest import testmod

					testmod(verbose=True)
					print(f"""{ugly_numbers(2_0_0) = }""")




