



'''simple docstring'''




from typing import List, Optional, Tuple

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


lowerCamelCase							:Any				    =					logging.get_logger(__name__)

lowerCamelCase							:Optional[Any]				    =					{'''vocab_file''': '''vocab.json''', '''merges_file''': '''merges.txt''', '''tokenizer_file''': '''tokenizer.json'''}

lowerCamelCase							:Union[str, Any]				    =					{
    '''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'''
    },
}

lowerCamelCase							:Optional[Any]				    =					{'''allegro/herbert-base-cased''': 5_1_4}
lowerCamelCase							:str				    =					{}







class 	_lowerCAmelCase							(			__UpperCAmelCase ):
	__SCREAMING_SNAKE_CASE   :		Optional[Any]					=					VOCAB_FILES_NAMES
	__SCREAMING_SNAKE_CASE   :		int					=					PRETRAINED_VOCAB_FILES_MAP
	__SCREAMING_SNAKE_CASE   :		Dict					=					PRETRAINED_INIT_CONFIGURATION
	__SCREAMING_SNAKE_CASE   :		int					=					PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
	__SCREAMING_SNAKE_CASE   :		List[str]					=					HerbertTokenizer


	def __init__(self       ,      lowercase=None       ,      lowercase=None       ,      lowercase=None       ,      lowercase="<s>"       ,      lowercase="<unk>"       ,      lowercase="<pad>"       ,      lowercase="<mask>"       ,      lowercase="</s>"       ,      **lowercase       ,      ):
				super().__init__(
				    lowercase       ,      lowercase       ,      tokenizer_file=lowercase       ,      cls_token=lowercase       ,      unk_token=lowercase       ,      pad_token=lowercase       ,      mask_token=lowercase       ,      sep_token=lowercase       ,      **lowercase       ,      )


	def     _a	(self       ,      lowercase       ,      lowercase = None							):
				A_	:						Dict	=     [self.cls_token_id]
				A_	:						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     _a	(self       ,      lowercase       ,      lowercase = None       ,      lowercase = False							):
				if already_has_special_tokens:
							return super().get_special_tokens_mask(
							    token_ids_a=lowercase       ,      token_ids_a=lowercase       ,      already_has_special_tokens=lowercase							)

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


	def     _a	(self       ,      lowercase       ,      lowercase = None							):
				A_	:						int	=     [self.sep_token_id]
				A_	:						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     _a	(self       ,      lowercase       ,      lowercase = None							):
				A_	:						Tuple	=     self._tokenizer.model.save(lowercase       ,      name=lowercase							)
				return tuple(lowercase							)




'''simple docstring'''




from string import ascii_lowercase, ascii_uppercase



def 	a			( lowerCamelCase__    ):
			'''simple docstring'''





			if not sentence:
						return ""
			A_	:						Optional[int]	=     dict(zip(lowerCamelCase__						,      lowerCamelCase__    )    )
			return lower_to_upper.get(sentence[0]						,      sentence[0]    ) + sentence[1:]


if __name__ == "__main__":
						from doctest import testmod

						testmod()