



"""simple docstring"""






from typing import List, Optional, Tuple

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_herbert import HerbertTokenizer


__snake_case				:  str =       logging.get_logger(__name__)

__snake_case				:  Any =       {'vocab_file': 'vocab.json', 'merges_file': 'merges.txt', 'tokenizer_file': 'tokenizer.json'}

__snake_case				:  str =       {
    'vocab_file': {
        'allegro/herbert-base-cased': 'https://huggingface.co/allegro/herbert-base-cased/resolve/main/vocab.json'
    },
    'merges_file': {
        'allegro/herbert-base-cased': 'https://huggingface.co/allegro/herbert-base-cased/resolve/main/merges.txt'
    },
}

__snake_case				:  Optional[Any] =       {'allegro/herbert-base-cased': 514}
__snake_case				:  Optional[int] =       {}



class      A__  (    __SCREAMING_SNAKE_CASE				):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE        =      VOCAB_FILES_NAMES
	SCREAMING_SNAKE_CASE        =      PRETRAINED_VOCAB_FILES_MAP
	SCREAMING_SNAKE_CASE        =      PRETRAINED_INIT_CONFIGURATION
	SCREAMING_SNAKE_CASE        =      PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
	SCREAMING_SNAKE_CASE        =      HerbertTokenizer

	def __init__(	self:						Any			,     _SCREAMING_SNAKE_CASE:						str=None			,     _SCREAMING_SNAKE_CASE:						Dict=None			,     _SCREAMING_SNAKE_CASE:						List[Any]=None			,     _SCREAMING_SNAKE_CASE:						str="<s>"			,     _SCREAMING_SNAKE_CASE:						List[str]="<unk>"			,     _SCREAMING_SNAKE_CASE:						Any="<pad>"			,     _SCREAMING_SNAKE_CASE:						Any="<mask>"			,     _SCREAMING_SNAKE_CASE:						Tuple="</s>"			,     **_SCREAMING_SNAKE_CASE:						int			,     )							->			Tuple:

				"""simple docstring"""

				super().__init__(
				    _SCREAMING_SNAKE_CASE			,     _SCREAMING_SNAKE_CASE			,     tokenizer_file=_SCREAMING_SNAKE_CASE			,     cls_token=_SCREAMING_SNAKE_CASE			,     unk_token=_SCREAMING_SNAKE_CASE			,     pad_token=_SCREAMING_SNAKE_CASE			,     mask_token=_SCREAMING_SNAKE_CASE			,     sep_token=_SCREAMING_SNAKE_CASE			,     **_SCREAMING_SNAKE_CASE			,     )

	def 				_SCREAMING_SNAKE_CASE  (	self:						int			,     _SCREAMING_SNAKE_CASE:						List[int]			,     _SCREAMING_SNAKE_CASE:						Optional[List[int]] = None)							->			List[int]:

				"""simple docstring"""

				__lowerCAmelCase :    Dict				=			[self.cls_token_id]
				__lowerCAmelCase :    Any				=			[self.sep_token_id]
				if token_ids_a is None:
							return cls + token_ids_a + sep

				return cls + token_ids_a + sep + token_ids_a + sep

	def 				_SCREAMING_SNAKE_CASE  (	self:						Union[str, Any]			,     _SCREAMING_SNAKE_CASE:						List[int]			,     _SCREAMING_SNAKE_CASE:						Optional[List[int]] = None			,     _SCREAMING_SNAKE_CASE:						bool = False)							->			List[int]:

				"""simple docstring"""

				if already_has_special_tokens:
							return super().get_special_tokens_mask(
							    token_ids_a=_SCREAMING_SNAKE_CASE			,     token_ids_a=_SCREAMING_SNAKE_CASE			,     already_has_special_tokens=_SCREAMING_SNAKE_CASE)

				if token_ids_a is None:
							return [1] + ([0] * len(_SCREAMING_SNAKE_CASE)) + [1]
				return [1] + ([0] * len(_SCREAMING_SNAKE_CASE)) + [1] + ([0] * len(_SCREAMING_SNAKE_CASE)) + [1]

	def 				_SCREAMING_SNAKE_CASE  (	self:						List[str]			,     _SCREAMING_SNAKE_CASE:						List[int]			,     _SCREAMING_SNAKE_CASE:						Optional[List[int]] = None)							->			List[int]:

				"""simple docstring"""

				__lowerCAmelCase :    Dict				=			[self.sep_token_id]
				__lowerCAmelCase :    Any				=			[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:						Any			,     _SCREAMING_SNAKE_CASE:						str			,     _SCREAMING_SNAKE_CASE:						Optional[str] = None)							->			Tuple[str]:

				"""simple docstring"""

				__lowerCAmelCase :    Union[str, Any]				=			self._tokenizer.model.save(_SCREAMING_SNAKE_CASE			,     name=_SCREAMING_SNAKE_CASE)
				return tuple(_SCREAMING_SNAKE_CASE)




"""simple docstring"""






def      _lowercase							(    __snake_case   ,__snake_case      )		->  int:
			return int((input_a, input_a).count(1      ) != 0      )


def      _lowercase							(    )		->  None:
			assert or_gate(0   ,0      ) == 0
			assert or_gate(0   ,1      ) == 1
			assert or_gate(1   ,0      ) == 1
			assert or_gate(1   ,1      ) == 1


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