




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	:       Tuple     =	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	:       List[Any]     =	{'mobilebert-uncased': 512}


__lowerCAmelCase	:       Any     =	{}




class 					snake_case__							(_UpperCamelCase     ):
    """simple docstring"""



    SCREAMING_SNAKE_CASE_ :							Tuple											=      VOCAB_FILES_NAMES
    SCREAMING_SNAKE_CASE_ :							str											=      PRETRAINED_VOCAB_FILES_MAP
    SCREAMING_SNAKE_CASE_ :							Tuple											=      PRETRAINED_INIT_CONFIGURATION
    SCREAMING_SNAKE_CASE_ :							Any											=      PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
    SCREAMING_SNAKE_CASE_ :							Optional[Any]											=      MobileBertTokenizer





    def __init__(   self       :  int      ,   __lowerCamelCase       :  Tuple=None      ,   __lowerCamelCase       :  Dict=None      ,   __lowerCamelCase       :  Dict=True      ,   __lowerCamelCase       :  Tuple="[UNK]"      ,   __lowerCamelCase       :  Optional[Any]="[SEP]"      ,   __lowerCamelCase       :  Union[str, Any]="[PAD]"      ,   __lowerCamelCase       :  int="[CLS]"      ,   __lowerCamelCase       :  List[str]="[MASK]"      ,   __lowerCamelCase       :  Dict=True      ,   __lowerCamelCase       :  Union[str, Any]=None      ,   **__lowerCamelCase       :  Optional[Any]      ,   )      ->  List[str]:
       super().__init__(
           __lowerCamelCase      ,   tokenizer_file=__lowerCamelCase      ,   do_lower_case=__lowerCamelCase      ,   unk_token=__lowerCamelCase      ,   sep_token=__lowerCamelCase      ,   pad_token=__lowerCamelCase      ,   cls_token=__lowerCamelCase      ,   mask_token=__lowerCamelCase      ,   tokenize_chinese_chars=__lowerCamelCase      ,   strip_accents=__lowerCamelCase      ,   **__lowerCamelCase      ,   )

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

       a					=    do_lower_case





    def 							__UpperCAmelCase							(   self       :  List[str]      ,   __lowerCamelCase       :  Dict      ,   __lowerCamelCase       :  List[str]=None							)      ->  int:
       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 							__UpperCAmelCase							(   self       :  Dict      ,   __lowerCamelCase       :  List[int]      ,   __lowerCamelCase       :  Optional[List[int]] = 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 							__UpperCAmelCase							(   self       :  Optional[Any]      ,   __lowerCamelCase       :  str      ,   __lowerCamelCase       :  Optional[str] = None							)      ->  Tuple[str]:
       a					=    self._tokenizer.model.save(__lowerCamelCase      ,   name=__lowerCamelCase							)
       return tuple(__lowerCamelCase							)












def     __magic_name__       (				A	:      int,						A	:      int,						A	:      int     ):






			'''simple docstring'''







			if exponent == 1:
						return base
			if exponent % 2 == 0:
						a					=    _modexpt(A,						exponent // 2,						A     ) % modulo_value
						return (x * x) % modulo_value
			else:
						return (base * _modexpt(A,						exponent - 1,						A     )) % modulo_value




def     __magic_name__       (				A	:      int = 1777,						A	:      int = 1855,						A	:      int = 8     ):






			'''simple docstring'''







			a					=    base
			for _ in range(1,						A     ):
						a					=    _modexpt(A,						A,						10**digits     )

			return result


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






