





"""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_albert import AlbertTokenizer
else:
		__magic_name__       :					Dict						=			None

__magic_name__       :					Union[str, Any]						=			logging.get_logger(__name__)
__magic_name__       :					int						=			{"""vocab_file""": """spiece.model""", """tokenizer_file""": """tokenizer.json"""}

__magic_name__       :					Optional[int]						=			{
    """vocab_file""": {
        """albert-base-v1""": """https://huggingface.co/albert-base-v1/resolve/main/spiece.model""",
        """albert-large-v1""": """https://huggingface.co/albert-large-v1/resolve/main/spiece.model""",
        """albert-xlarge-v1""": """https://huggingface.co/albert-xlarge-v1/resolve/main/spiece.model""",
        """albert-xxlarge-v1""": """https://huggingface.co/albert-xxlarge-v1/resolve/main/spiece.model""",
        """albert-base-v2""": """https://huggingface.co/albert-base-v2/resolve/main/spiece.model""",
        """albert-large-v2""": """https://huggingface.co/albert-large-v2/resolve/main/spiece.model""",
        """albert-xlarge-v2""": """https://huggingface.co/albert-xlarge-v2/resolve/main/spiece.model""",
        """albert-xxlarge-v2""": """https://huggingface.co/albert-xxlarge-v2/resolve/main/spiece.model""",
    },
    """tokenizer_file""": {
        """albert-base-v1""": """https://huggingface.co/albert-base-v1/resolve/main/tokenizer.json""",
        """albert-large-v1""": """https://huggingface.co/albert-large-v1/resolve/main/tokenizer.json""",
        """albert-xlarge-v1""": """https://huggingface.co/albert-xlarge-v1/resolve/main/tokenizer.json""",
        """albert-xxlarge-v1""": """https://huggingface.co/albert-xxlarge-v1/resolve/main/tokenizer.json""",
        """albert-base-v2""": """https://huggingface.co/albert-base-v2/resolve/main/tokenizer.json""",
        """albert-large-v2""": """https://huggingface.co/albert-large-v2/resolve/main/tokenizer.json""",
        """albert-xlarge-v2""": """https://huggingface.co/albert-xlarge-v2/resolve/main/tokenizer.json""",
        """albert-xxlarge-v2""": """https://huggingface.co/albert-xxlarge-v2/resolve/main/tokenizer.json""",
    },
}

__magic_name__       :					Tuple						=			{
    """albert-base-v1""": 5_1_2,
    """albert-large-v1""": 5_1_2,
    """albert-xlarge-v1""": 5_1_2,
    """albert-xxlarge-v1""": 5_1_2,
    """albert-base-v2""": 5_1_2,
    """albert-large-v2""": 5_1_2,
    """albert-xlarge-v2""": 5_1_2,
    """albert-xxlarge-v2""": 5_1_2,
}

__magic_name__       :					List[Any]						=			"""▁"""






class 							lowercase__			(   __SCREAMING_SNAKE_CASE	):

			"""simple docstring"""
			__lowerCAmelCase     :				Optional[int]										=  VOCAB_FILES_NAMES
			__lowerCAmelCase     :				Optional[int]										=  PRETRAINED_VOCAB_FILES_MAP
			__lowerCAmelCase     :				List[str]										=  PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
			__lowerCAmelCase     :				Optional[int]										=  AlbertTokenizer







			def __init__(      self						,   _A=None						,   _A=None						,   _A=True						,   _A=True						,   _A=False						,   _A="[CLS]"						,   _A="[SEP]"						,   _A="<unk>"						,   _A="[SEP]"						,   _A="<pad>"						,   _A="[CLS]"						,   _A="[MASK]"						,   **_A						,   ):






									'''simple docstring'''







									UpperCamelCase				:		List[str]				   =			(
									    AddedToken(_A						,   lstrip=_A						,   rstrip=_A						,   normalized=_A    )
									    if isinstance(_A						,   _A    )
									    else mask_token
									)

									super().__init__(
									    _A						,   tokenizer_file=_A						,   do_lower_case=_A						,   remove_space=_A						,   keep_accents=_A						,   bos_token=_A						,   eos_token=_A						,   unk_token=_A						,   sep_token=_A						,   pad_token=_A						,   cls_token=_A						,   mask_token=_A						,   **_A						,   )

									UpperCamelCase				:		Dict				   =			do_lower_case
									UpperCamelCase				:		str				   =			remove_space
									UpperCamelCase				:		List[str]				   =			keep_accents
									UpperCamelCase				:		Optional[int]				   =			vocab_file
									UpperCamelCase				:		Tuple				   =			False if not self.vocab_file else True







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






									'''simple docstring'''







									UpperCamelCase				:		Dict				   =			[self.sep_token_id]
									UpperCamelCase				:		Optional[Any]				   =			[self.cls_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						,   _A						,   _A = None    ):






									'''simple docstring'''







									UpperCamelCase				:		Tuple				   =			[self.sep_token_id]
									UpperCamelCase				:		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						,   _A						,   _A = None    ):






									'''simple docstring'''







									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(_A    ):
															logger.error(f"""Vocabulary path ({save_directory}) should be a directory"""    )
															return
									UpperCamelCase				:		List[Any]				   =			os.path.join(
									    _A						,   (filename_prefix + """-""" if filename_prefix else """""") + VOCAB_FILES_NAMES["""vocab_file"""]    )

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

									return (out_vocab_file,)






'''simple docstring'''

import string

def 					__UpperCamelCase				(						lowercase__    :	str			):






     '''simple docstring'''





     for key in range(len(string.ascii_uppercase			)			):
          __lowercase      		=''
          for symbol in message:
               if symbol in string.ascii_uppercase:
                    __lowercase      		=string.ascii_uppercase.find(lowercase__			)
                    __lowercase      		=num - key
                    if num < 0:
                         __lowercase      		=num + len(string.ascii_uppercase			)
                    __lowercase      		=translated + string.ascii_uppercase[num]
               else:
                    __lowercase      		=translated + symbol
          print(F'''Decryption using Key #{key}: {translated}'''			)

def 					__UpperCamelCase				(						):






     '''simple docstring'''





     __lowercase      		=input('Encrypted message: '			)
     __lowercase      		=message.upper()
     decrypt(lowercase__			)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()


