



'''simple docstring'''




import os
from shutil import copyfile
from typing import List, Optional, Tuple

from ...tokenization_utils import AddedToken
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import is_sentencepiece_available, logging


if is_sentencepiece_available():
						from .tokenization_camembert import CamembertTokenizer
else:
						lowerCamelCase							:List[Any]       = None


lowerCamelCase							:Tuple       = logging.get_logger(__name__)

lowerCamelCase							:Optional[Any]       = {'''vocab_file''': '''sentencepiece.bpe.model''', '''tokenizer_file''': '''tokenizer.json'''}

lowerCamelCase							:int       = {
    '''vocab_file''': {
        '''camembert-base''': '''https://huggingface.co/camembert-base/resolve/main/sentencepiece.bpe.model''',
    },
    '''tokenizer_file''': {
        '''camembert-base''': '''https://huggingface.co/camembert-base/resolve/main/tokenizer.json''',
    },
}

lowerCamelCase							:List[Any]       = {
    '''camembert-base''': 5_1_2,
}

lowerCamelCase							:List[str]       = '''▁'''







class      _lowerCAmelCase							(      __UpperCAmelCase			):
	__SCREAMING_SNAKE_CASE       :		int		      = VOCAB_FILES_NAMES
	__SCREAMING_SNAKE_CASE       :		int		      = PRETRAINED_VOCAB_FILES_MAP
	__SCREAMING_SNAKE_CASE       :		Dict		      = PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
	__SCREAMING_SNAKE_CASE       :		Dict		      = ['input_ids', 'attention_mask']
	__SCREAMING_SNAKE_CASE       :		List[Any]		      = CamembertTokenizer


	def __init__(self	,				lowercase=None	,				lowercase=None	,				lowercase="<s>"	,				lowercase="</s>"	,				lowercase="</s>"	,				lowercase="<s>"	,				lowercase="<unk>"	,				lowercase="<pad>"	,				lowercase="<mask>"	,				lowercase=["<s>NOTUSED", "</s>NOTUSED"]	,				**lowercase	,				):
				# Mask token behave like a normal word, i.e. include the space before it
				A_     :						str     =					AddedToken(lowercase	,				lstrip=lowercase	,				rstrip=lowercase							) if isinstance(lowercase	,				lowercase							) else mask_token

				super().__init__(
				    lowercase	,				tokenizer_file=lowercase	,				bos_token=lowercase	,				eos_token=lowercase	,				sep_token=lowercase	,				cls_token=lowercase	,				unk_token=lowercase	,				pad_token=lowercase	,				mask_token=lowercase	,				additional_special_tokens=lowercase	,				**lowercase	,				)

				A_     :						Any     =					vocab_file
				A_     :						Union[str, Any]     =					False if not self.vocab_file else True


	def    _a     (self	,				lowercase	,				lowercase = None							):

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


	def    _a     (self	,				lowercase	,				lowercase = None							):
				A_     :						int     =					[self.sep_token_id]
				A_     :						Optional[int]     =					[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 + sep + token_ids_a + sep							) * [0]


	def    _a     (self	,				lowercase	,				lowercase = None							):
				if not self.can_save_slow_tokenizer:
							raise ValueError(
							    """Your fast tokenizer does not have the necessary information to save the vocabulary for a slow """
							    """tokenizer."""							)

				if not os.path.isdir(lowercase							):
							logger.error(F'Vocabulary path ({save_directory}) should be a directory'							)
							return
				A_     :						Optional[int]     =					os.path.join(
				    lowercase	,				(filename_prefix + """-""" if filename_prefix else """""") + VOCAB_FILES_NAMES["""vocab_file"""]							)

				if os.path.abspath(self.vocab_file							) != os.path.abspath(lowercase							):
							copyfile(self.vocab_file	,				lowercase							)

				return (out_vocab_file,)




'''simple docstring'''




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





			A_     :						Optional[int]     =					[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

			A_     :						Dict     =					6
			A_     :						List[Any]     =					1
			A_     :						Optional[Any]     =					19_01

			A_     :						Tuple     =					0

			while year < 20_01:
						day += 7

						if (year % 4 == 0 and year % 1_00 != 0) or (year % 4_00 == 0):
									if day > days_per_month[month - 1] and month != 2:
												month += 1
												A_     :						Optional[Any]     =					day - days_per_month[month - 2]
									elif day > 29 and month == 2:
												month += 1
												A_     :						str     =					day - 29
						else:
									if day > days_per_month[month - 1]:
												month += 1
												A_     :						List[str]     =					day - days_per_month[month - 2]

						if month > 12:
									year += 1
									A_     :						Tuple     =					1

						if year < 20_01 and day == 1:
									sundays += 1
			return sundays


if __name__ == "__main__":
						print(solution())