


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

from ...file_utils import is_sentencepiece_available
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging


if is_sentencepiece_available():
       from .tokenization_deberta_va import DebertaVaTokenizer
else:
       __UpperCamelCase							:							Union[str, Any]    							=					None

__UpperCamelCase							:							str    							=					logging.get_logger(__name__)

__UpperCamelCase							:							Optional[int]    							=					{'''vocab_file''': '''spm.model''', '''tokenizer_file''': '''tokenizer.json'''}

__UpperCamelCase							:							Any    							=					{
    '''vocab_file''': {
        '''microsoft/deberta-v2-xlarge''': '''https://huggingface.co/microsoft/deberta-v2-xlarge/resolve/main/spm.model''',
        '''microsoft/deberta-v2-xxlarge''': '''https://huggingface.co/microsoft/deberta-v2-xxlarge/resolve/main/spm.model''',
        '''microsoft/deberta-v2-xlarge-mnli''': (
            '''https://huggingface.co/microsoft/deberta-v2-xlarge-mnli/resolve/main/spm.model'''
        ),
        '''microsoft/deberta-v2-xxlarge-mnli''': (
            '''https://huggingface.co/microsoft/deberta-v2-xxlarge-mnli/resolve/main/spm.model'''
        ),
    }
}

__UpperCamelCase							:							Dict    							=					{
    '''microsoft/deberta-v2-xlarge''': 512,
    '''microsoft/deberta-v2-xxlarge''': 512,
    '''microsoft/deberta-v2-xlarge-mnli''': 512,
    '''microsoft/deberta-v2-xxlarge-mnli''': 512,
}

__UpperCamelCase							:							Optional[int]    							=					{
    '''microsoft/deberta-v2-xlarge''': {'''do_lower_case''': False},
    '''microsoft/deberta-v2-xxlarge''': {'''do_lower_case''': False},
    '''microsoft/deberta-v2-xlarge-mnli''': {'''do_lower_case''': False},
    '''microsoft/deberta-v2-xxlarge-mnli''': {'''do_lower_case''': False},
}

class    __magic_name__						(  lowercase__):
     A:		Dict								=   VOCAB_FILES_NAMES
     A:		List[Any]								=   PRETRAINED_VOCAB_FILES_MAP
     A:		List[Any]								=   PRETRAINED_INIT_CONFIGURATION
     A:		Optional[Any]								=   PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
     A:		Optional[int]								=   DebertaVaTokenizer


     def __init__(   self				:  Optional[Any]				,						lowerCamelCase__				:  Any=None				,						lowerCamelCase__				:  int=None				,						lowerCamelCase__				:  Optional[int]=False				,						lowerCamelCase__				:  Tuple=False				,						lowerCamelCase__				:  List[str]="[CLS]"				,						lowerCamelCase__				:  Tuple="[SEP]"				,						lowerCamelCase__				:  List[str]="[UNK]"				,						lowerCamelCase__				:  Optional[int]="[SEP]"				,						lowerCamelCase__				:  Tuple="[PAD]"				,						lowerCamelCase__				:  Optional[int]="[CLS]"				,						lowerCamelCase__				:  List[Any]="[MASK]"				,						**lowerCamelCase__				:  Tuple				,						)	->   None:





      '''simple docstring'''






      super().__init__(
          lowerCamelCase__				,						tokenizer_file=lowerCamelCase__				,						do_lower_case=lowerCamelCase__				,						bos_token=lowerCamelCase__				,						eos_token=lowerCamelCase__				,						unk_token=lowerCamelCase__				,						sep_token=lowerCamelCase__				,						pad_token=lowerCamelCase__				,						cls_token=lowerCamelCase__				,						mask_token=lowerCamelCase__				,						split_by_punct=lowerCamelCase__				,						**lowerCamelCase__				,						)

      UpperCamelCase__       :     Optional[Any] 							= do_lower_case
      UpperCamelCase__       :     List[str] 							= split_by_punct
      UpperCamelCase__       :     Optional[int] 							= vocab_file
      UpperCamelCase__       :     Optional[int] 							= False if not self.vocab_file else True


     def   UpperCAmelCase__						(   self				:  List[Any]				,						lowerCamelCase__				:  Union[str, Any]				,						lowerCamelCase__				:  List[str]=None      )	->   int:





      '''simple docstring'''






      if token_ids_a is None:
       return [self.cls_token_id] + token_ids_a + [self.sep_token_id]
      UpperCamelCase__       :     Union[str, Any] 							= [self.cls_token_id]
      UpperCamelCase__       :     Optional[int] 							= [self.sep_token_id]
      return cls + token_ids_a + sep + token_ids_a + sep


     def   UpperCAmelCase__						(   self				:  Optional[int]				,						lowerCamelCase__				:  Dict				,						lowerCamelCase__				:  Optional[Any]=None				,						lowerCamelCase__				:  Optional[Any]=False      )	->   Dict:





      '''simple docstring'''






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

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


     def   UpperCAmelCase__						(   self				:  List[Any]				,						lowerCamelCase__				:  List[Any]				,						lowerCamelCase__				:  Any=None      )	->   List[str]:





      '''simple docstring'''






      UpperCamelCase__       :     Any 							= [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   UpperCAmelCase__						(   self				:  int				,						lowerCamelCase__				:  str				,						lowerCamelCase__				:  Optional[str] = None      )	->   Tuple[str]:





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

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

      return (out_vocab_file,)








def 							__lowerCAmelCase			(UpperCAmelCase_		):
    return n * (2 * n - 1)
def 							__lowerCAmelCase			(UpperCAmelCase_		):
    a__  			=							(1 + 24 * n) ** 0.5
    return ((1 + root) / 6) % 1 == 0
def 							__lowerCAmelCase			(UpperCAmelCase_ = 144		):
    a__  			=							start
    a__  			=							hexagonal_num(UpperCAmelCase_		)
    while not is_pentagonal(UpperCAmelCase_		):
        n += 1
        a__  			=							hexagonal_num(UpperCAmelCase_		)
    return num


if __name__ == "__main__":
 print(F"{solution()} = ")






