"""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_convbert import ConvBertTokenizer


_a     :     Any= logging.get_logger(__name__)

_a     :     List[str]= {'vocab_file': 'vocab.txt'}

_a     :     List[Any]= {
    'vocab_file': {
        'YituTech/conv-bert-base': 'https://huggingface.co/YituTech/conv-bert-base/resolve/main/vocab.txt',
        'YituTech/conv-bert-medium-small': (
            'https://huggingface.co/YituTech/conv-bert-medium-small/resolve/main/vocab.txt'
        ),
        'YituTech/conv-bert-small': 'https://huggingface.co/YituTech/conv-bert-small/resolve/main/vocab.txt',
    }
}

_a     :     Optional[Any]= {
    'YituTech/conv-bert-base': 512,
    'YituTech/conv-bert-medium-small': 512,
    'YituTech/conv-bert-small': 512,
}


_a     :     str= {
    'YituTech/conv-bert-base': {'do_lower_case': True},
    'YituTech/conv-bert-medium-small': {'do_lower_case': True},
    'YituTech/conv-bert-small': {'do_lower_case': True},
}

class 		UpperCamelCase			(    a__						):
				UpperCAmelCase				:      Tuple    =		VOCAB_FILES_NAMES
				UpperCAmelCase				:      Union[str, Any]    =		PRETRAINED_VOCAB_FILES_MAP
				UpperCAmelCase				:      List[Any]    =		PRETRAINED_INIT_CONFIGURATION
				UpperCAmelCase				:      Tuple    =		PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
				UpperCAmelCase				:      List[Any]    =		ConvBertTokenizer



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

					__snake_case			:							List[Any]      		= json.loads(self.backend_tokenizer.normalizer.__getstate__())
					if (
					    normalizer_state.get('lowercase'	,  SCREAMING_SNAKE_CASE__) != do_lower_case
					    or normalizer_state.get('strip_accents'	,  SCREAMING_SNAKE_CASE__) != strip_accents
					    or normalizer_state.get('handle_chinese_chars'	,  SCREAMING_SNAKE_CASE__) != tokenize_chinese_chars
					):
						__snake_case			:							Union[str, Any]      		= getattr(SCREAMING_SNAKE_CASE__	,  normalizer_state.pop('type'))
						__snake_case			:							Any      		= do_lower_case
						__snake_case			:							Union[str, Any]      		= strip_accents
						__snake_case			:							Any      		= tokenize_chinese_chars
						__snake_case			:							Any      		= normalizer_class(**SCREAMING_SNAKE_CASE__)

					__snake_case			:							Optional[Any]      		= do_lower_case



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







"""simple docstring"""




def lowercase_  (   _snake_case   ,_snake_case						):
							return 1 if input_a == input_a else 0

def lowercase_  (   ):
							assert xnor_gate(0   ,0						) == 1
							assert xnor_gate(0   ,1						) == 0
							assert xnor_gate(1   ,0						) == 0
							assert xnor_gate(1   ,1						) == 1


if __name__ == "__main__":
					print(xnor_gate(0, 0))
					print(xnor_gate(0, 1))
					print(xnor_gate(1, 0))
					print(xnor_gate(1, 1))




