import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_mobilebert import MobileBertTokenizer


lowerCamelCase_    :		List[Any]							=	logging.get_logger(__name__)

lowerCamelCase_    :		Any							=	{"vocab_file": "vocab.txt", "tokenizer_file": "tokenizer.json"}

lowerCamelCase_    :		Dict							=	{
    "vocab_file": {"mobilebert-uncased": "https://huggingface.co/google/mobilebert-uncased/resolve/main/vocab.txt"},
    "tokenizer_file": {
        "mobilebert-uncased": "https://huggingface.co/google/mobilebert-uncased/resolve/main/tokenizer.json"
    },
}

lowerCamelCase_    :		Dict							=	{"mobilebert-uncased": 512}


lowerCamelCase_    :		Tuple							=	{}


class 						a__							(       UpperCamelCase_		):
			A__    :       str        =      VOCAB_FILES_NAMES
			A__    :       List[str]        =      PRETRAINED_VOCAB_FILES_MAP
			A__    :       Any        =      PRETRAINED_INIT_CONFIGURATION
			A__    :       int        =      PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
			A__    :       Tuple        =      MobileBertTokenizer



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

								__a		 =       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
								):
													__a		 =       getattr(_a				,						normalizer_state.pop('type'   )   )
													__a		 =       do_lower_case
													__a		 =       strip_accents
													__a		 =       tokenize_chinese_chars
													__a		 =       normalizer_class(**_a   )

								__a		 =       do_lower_case



			def __SCREAMING_SNAKE_CASE							(						self				,						UpperCAmelCase				,						UpperCAmelCase=None   )			->   Dict:
								__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 __SCREAMING_SNAKE_CASE							(						self				,						UpperCAmelCase				,						UpperCAmelCase = None   )			->   List[int]:
								__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 __SCREAMING_SNAKE_CASE							(						self				,						UpperCAmelCase				,						UpperCAmelCase = None   )			->   Tuple[str]:
								__a		 =       self._tokenizer.model.save(_a				,						name=_a   )
								return tuple(_a   )


from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels
from .squad import SquadExample, SquadFeatures, SquadVaProcessor, SquadVaProcessor, squad_convert_examples_to_features
from .utils import DataProcessor, InputExample, InputFeatures, SingleSentenceClassificationProcessor
from .xnli import xnli_output_modes, xnli_processors, xnli_tasks_num_labels




