





import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_squeezebert import SqueezeBertTokenizer


__A							:			Union[str, Any]         =			logging.get_logger(__name__)

__A							:			Optional[Any]         =			{"vocab_file": "vocab.txt", "tokenizer_file": "tokenizer.json"}

__A							:			Any         =			{
    "vocab_file": {
        "squeezebert/squeezebert-uncased": (
            "https://huggingface.co/squeezebert/squeezebert-uncased/resolve/main/vocab.txt"
        ),
        "squeezebert/squeezebert-mnli": "https://huggingface.co/squeezebert/squeezebert-mnli/resolve/main/vocab.txt",
        "squeezebert/squeezebert-mnli-headless": (
            "https://huggingface.co/squeezebert/squeezebert-mnli-headless/resolve/main/vocab.txt"
        ),
    },
    "tokenizer_file": {
        "squeezebert/squeezebert-uncased": (
            "https://huggingface.co/squeezebert/squeezebert-uncased/resolve/main/tokenizer.json"
        ),
        "squeezebert/squeezebert-mnli": (
            "https://huggingface.co/squeezebert/squeezebert-mnli/resolve/main/tokenizer.json"
        ),
        "squeezebert/squeezebert-mnli-headless": (
            "https://huggingface.co/squeezebert/squeezebert-mnli-headless/resolve/main/tokenizer.json"
        ),
    },
}

__A							:			Union[str, Any]         =			{
    "squeezebert/squeezebert-uncased": 512,
    "squeezebert/squeezebert-mnli": 512,
    "squeezebert/squeezebert-mnli-headless": 512,
}


__A							:			List[str]         =			{
    "squeezebert/squeezebert-uncased": {"do_lower_case": True},
    "squeezebert/squeezebert-mnli": {"do_lower_case": True},
    "squeezebert/squeezebert-mnli-headless": {"do_lower_case": True},
}







class      lowerCamelCase(						__snake_case	):
     '''simple docstring'''


     __magic_name__   =			VOCAB_FILES_NAMES
     __magic_name__   =			PRETRAINED_VOCAB_FILES_MAP
     __magic_name__   =			PRETRAINED_INIT_CONFIGURATION
     __magic_name__   =			PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
     __magic_name__   =			SqueezeBertTokenizer




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

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

         _A     =							do_lower_case




     def        lowerCAmelCase__		(    self				,     snake_case_				,     snake_case_=None							):
         _A     =							[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				,     snake_case_				,     snake_case_ = None							):
         _A     =							[self.sep_token_id]
         _A     =							[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				,     snake_case_				,     snake_case_ = None							):
         _A     =							self._tokenizer.model.save(snake_case_				,     name=snake_case_							)
         return tuple(snake_case_							)












from ... import PretrainedConfig


__A							:			Optional[Any]         =			{
    "sijunhe/nezha-cn-base": "https://huggingface.co/sijunhe/nezha-cn-base/resolve/main/config.json",
}







class      lowerCamelCase(						__snake_case	):
     '''simple docstring'''


     __magic_name__   =			NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP
     __magic_name__   =			'nezha'




     def __init__(    self				,     snake_case_=2_1128				,     snake_case_=768				,     snake_case_=12				,     snake_case_=12				,     snake_case_=3072				,     snake_case_="gelu"				,     snake_case_=0.1				,     snake_case_=0.1				,     snake_case_=512				,     snake_case_=64				,     snake_case_=2				,     snake_case_=0.02				,     snake_case_=1E-12				,     snake_case_=0.1				,     snake_case_=0				,     snake_case_=2				,     snake_case_=3				,     snake_case_=True				,     **snake_case_				,     ):
         super().__init__(pad_token_id=snake_case_				,     bos_token_id=snake_case_				,     eos_token_id=snake_case_				,     **snake_case_							)

         _A     =							vocab_size
         _A     =							hidden_size
         _A     =							num_hidden_layers
         _A     =							num_attention_heads
         _A     =							hidden_act
         _A     =							intermediate_size
         _A     =							hidden_dropout_prob
         _A     =							attention_probs_dropout_prob
         _A     =							max_position_embeddings
         _A     =							max_relative_position
         _A     =							type_vocab_size
         _A     =							initializer_range
         _A     =							layer_norm_eps
         _A     =							classifier_dropout
         _A     =							use_cache





