'''simple docstring'''




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


__UpperCAmelCase					=logging.get_logger(__name__)

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

__UpperCAmelCase					={
    "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"
    },
}

__UpperCAmelCase					={"mobilebert-uncased": 5_1_2}


__UpperCAmelCase					={}




class        a__ (  UpperCAmelCase__					):
     lowerCamelCase    :	Dict				=VOCAB_FILES_NAMES
     lowerCamelCase    :	Union[str, Any]				=PRETRAINED_VOCAB_FILES_MAP
     lowerCamelCase    :	Tuple				=PRETRAINED_INIT_CONFIGURATION
     lowerCamelCase    :	Tuple				=PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
     lowerCamelCase    :	Dict				=MobileBertTokenizer






     def __init__(					self						:						int    ,							a						:						str=None    ,							a						:						Tuple=None    ,							a						:						Optional[int]=True    ,							a						:						Dict="[UNK]"    ,							a						:						str="[SEP]"    ,							a						:						Optional[int]="[PAD]"    ,							a						:						List[str]="[CLS]"    ,							a						:						List[str]="[MASK]"    ,							a						:						str=True    ,							a						:						Union[str, Any]=None    ,							**a						:						Dict    ,							):





         """simple docstring"""



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

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

         __lowerCamelCase            =    do_lower_case






     def   SCREAMING_SNAKE_CASE__  (					self						:						Optional[Any]    ,							a						:						str    ,							a						:						str=None       ):





         """simple docstring"""



         __lowerCamelCase            =    [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						:						List[str]    ,							a						:						List[int]    ,							a						:						Optional[List[int]] = None       ):





         """simple docstring"""



         __lowerCamelCase            =    [self.sep_token_id]
         __lowerCamelCase            =    [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						:						Optional[Any]    ,							a						:						str    ,							a						:						Optional[str] = None       ):





         """simple docstring"""



         __lowerCamelCase            =    self._tokenizer.model.save(a    ,							name=a       )
         return tuple(a       )

'''simple docstring'''




def __lowerCAmelCase					(				UpperCamelCase__							)      ->       bool:
    if number < 0:
        raise ValueError('''number must not be negative'''							)
    return number & (number - 1) == 0


if __name__ == "__main__":
  import doctest

  doctest.testmod()
