

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							:	Tuple											=       {"vocab_file": "vocab.txt", "tokenizer_file": "tokenizer.json"}

__snake_case							:	int											=       {
    "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							:	List[str]											=       {
    "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							:	int											=       {
    "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     A__(_a				):
						"""simple docstring"""






						_A  :							List[str]     =       VOCAB_FILES_NAMES
						_A  :							str     =       PRETRAINED_VOCAB_FILES_MAP
						_A  :							Tuple     =       PRETRAINED_INIT_CONFIGURATION
						_A  :							Optional[int]     =       PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
						_A  :							List[str]     =       ElectraTokenizer





						def __init__(  self   ,	_lowercase=None   ,	_lowercase=None   ,	_lowercase=True   ,	_lowercase="[UNK]"   ,	_lowercase="[SEP]"   ,	_lowercase="[PAD]"   ,	_lowercase="[CLS]"   ,	_lowercase="[MASK]"   ,	_lowercase=True   ,	_lowercase=None   ,	**_lowercase   ,	)			->      Dict:
									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__   ,	)

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

									a_		:		Tuple      				=      do_lower_case





						def        UpperCamelCase__ (  self   ,	_lowercase   ,	_lowercase=None  )			->      int:
									a_		:		Optional[int]      				=      [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   ,	_lowercase   ,	_lowercase = None  )			->      List[str]:
									a_		:		Union[str, Any]      				=      [self.sep_token_id]
									a_		:		Union[str, 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        UpperCamelCase__ (  self   ,	_lowercase   ,	_lowercase = None  )			->      Dict:
									a_		:		Optional[Any]      				=      self._tokenizer.model.save(UpperCamelCase__   ,	name=UpperCamelCase__  )
									return tuple(UpperCamelCase__  )







'''simple docstring'''


from . import (
    albert,
    align,
    altclip,
    audio_spectrogram_transformer,
    auto,
    autoformer,
    bark,
    bart,
    barthez,
    bartpho,
    beit,
    bert,
    bert_generation,
    bert_japanese,
    bertweet,
    big_bird,
    bigbird_pegasus,
    biogpt,
    bit,
    blenderbot,
    blenderbot_small,
    blip,
    blip_a,
    bloom,
    bridgetower,
    byta,
    camembert,
    canine,
    chinese_clip,
    clap,
    clip,
    clipseg,
    codegen,
    conditional_detr,
    convbert,
    convnext,
    convnextva,
    cpm,
    cpmant,
    ctrl,
    cvt,
    dataavec,
    deberta,
    deberta_va,
    decision_transformer,
    deformable_detr,
    deit,
    deprecated,
    deta,
    detr,
    dialogpt,
    dinat,
    distilbert,
    dit,
    donut,
    dpr,
    dpt,
    efficientformer,
    efficientnet,
    electra,
    encodec,
    encoder_decoder,
    ernie,
    ernie_m,
    esm,
    falcon,
    flaubert,
    flava,
    fnet,
    focalnet,
    fsmt,
    funnel,
    git,
    glpn,
    gpta,
    gpt_bigcode,
    gpt_neo,
    gpt_neox,
    gpt_neox_japanese,
    gpt_swa,
    gptj,
    gptsan_japanese,
    graphormer,
    groupvit,
    herbert,
    hubert,
    ibert,
    imagegpt,
    informer,
    instructblip,
    jukebox,
    layoutlm,
    layoutlmva,
    layoutlmva,
    layoutxlm,
    led,
    levit,
    lilt,
    llama,
    longformer,
    longta,
    luke,
    lxmert,
    mam_aaa,
    marian,
    markuplm,
    maskaformer,
    maskformer,
    mbart,
    mbartaa,
    mega,
    megatron_bert,
    megatron_gpta,
    mgp_str,
    mluke,
    mobilebert,
    mobilenet_va,
    mobilenet_va,
    mobilevit,
    mobilevitva,
    mpnet,
    mra,
    mta,
    musicgen,
    mvp,
    nat,
    nezha,
    nllb,
    nllb_moe,
    nystromformer,
    oneformer,
    open_llama,
    openai,
    opt,
    owlvit,
    pegasus,
    pegasus_x,
    perceiver,
    phobert,
    pixastruct,
    plbart,
    poolformer,
    prophetnet,
    qdqbert,
    rag,
    realm,
    reformer,
    regnet,
    rembert,
    resnet,
    roberta,
    roberta_prelayernorm,
    roc_bert,
    roformer,
    rwkv,
    sam,
    segformer,
    sew,
    sew_d,
    speech_encoder_decoder,
    speech_to_text,
    speech_to_text_a,
    speechta,
    splinter,
    squeezebert,
    swiftformer,
    swin,
    swinasr,
    swinva,
    switch_transformers,
    ta,
    table_transformer,
    tapas,
    time_series_transformer,
    timesformer,
    timm_backbone,
    transfo_xl,
    trocr,
    tvlt,
    umta,
    unispeech,
    unispeech_sat,
    upernet,
    videomae,
    vilt,
    vision_encoder_decoder,
    vision_text_dual_encoder,
    visual_bert,
    vit,
    vit_hybrid,
    vit_mae,
    vit_msn,
    vivit,
    wavaveca,
    wavaveca_conformer,
    wavaveca_phoneme,
    wavaveca_with_lm,
    wavlm,
    whisper,
    x_clip,
    xglm,
    xlm,
    xlm_prophetnet,
    xlm_roberta,
    xlm_roberta_xl,
    xlnet,
    xmod,
    yolos,
    yoso,
)

