

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


lowerCAmelCase_			      =      logging.get_logger(__name__)

lowerCAmelCase_			      =      {'''vocab_file''': '''vocab.txt''', '''tokenizer_file''': '''tokenizer.json'''}

lowerCAmelCase_			      =      {
    '''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'''
        ),
    },
}

lowerCAmelCase_			      =      {
    '''squeezebert/squeezebert-uncased''': 5_12,
    '''squeezebert/squeezebert-mnli''': 5_12,
    '''squeezebert/squeezebert-mnli-headless''': 5_12,
}


lowerCAmelCase_			      =      {
    '''squeezebert/squeezebert-uncased''': {'''do_lower_case''': True},
    '''squeezebert/squeezebert-mnli''': {'''do_lower_case''': True},
    '''squeezebert/squeezebert-mnli-headless''': {'''do_lower_case''': True},
}





class       snake_case_  (						__A   ):







			'''simple docstring'''

			SCREAMING_SNAKE_CASE	:  Optional[Any]		     =							VOCAB_FILES_NAMES
			SCREAMING_SNAKE_CASE	:  List[Any]		     =							PRETRAINED_VOCAB_FILES_MAP
			SCREAMING_SNAKE_CASE	:  Optional[Any]		     =							PRETRAINED_INIT_CONFIGURATION
			SCREAMING_SNAKE_CASE	:  int		     =							PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
			SCREAMING_SNAKE_CASE	:  int		     =							SqueezeBertTokenizer







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

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

									snake_case_  =      do_lower_case







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



'''simple docstring'''






import re


def    _snake_case  (	A			)		->       bool:
							lowerCAmelCase__			  =      re.compile(R'''^(\+91[\-\s]?)?[0]?(91)?[789]\d{9}$'''			)
							if match := re.search(A					,       A			):
														return match.string == phone
							return False


if __name__ == "__main__":
		print(indian_phone_validator('''+918827897895'''))