"""simple docstring"""







import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_splinter import SplinterTokenizer


lowerCamelCase      : Tuple       =logging.get_logger(__name__)

lowerCamelCase      : str       ={'vocab_file': 'vocab.txt'}

lowerCamelCase      : Union[str, Any]       ={
    'vocab_file': {
        'tau/splinter-base': 'https://huggingface.co/tau/splinter-base/resolve/main/vocab.txt',
        'tau/splinter-base-qass': 'https://huggingface.co/tau/splinter-base-qass/resolve/main/vocab.txt',
        'tau/splinter-large': 'https://huggingface.co/tau/splinter-large/resolve/main/vocab.txt',
        'tau/splinter-large-qass': 'https://huggingface.co/tau/splinter-large-qass/resolve/main/vocab.txt',
    }
}

lowerCamelCase      : List[Any]       ={
    'tau/splinter-base': 5_12,
    'tau/splinter-base-qass': 5_12,
    'tau/splinter-large': 5_12,
    'tau/splinter-large-qass': 5_12,
}

lowerCamelCase      : int       ={
    'tau/splinter-base': {'do_lower_case': False},
    'tau/splinter-base-qass': {'do_lower_case': False},
    'tau/splinter-large': {'do_lower_case': False},
    'tau/splinter-large-qass': {'do_lower_case': False},
}






class 							__snake_case(					a__	):


    '''simple docstring'''





    _UpperCAmelCase       =			VOCAB_FILES_NAMES
    _UpperCAmelCase       =			PRETRAINED_VOCAB_FILES_MAP
    _UpperCAmelCase       =			PRETRAINED_INIT_CONFIGURATION
    _UpperCAmelCase       =			PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
    _UpperCAmelCase       =			SplinterTokenizer
    def __init__(  self					,       __lowerCamelCase=None					,       __lowerCamelCase=None					,       __lowerCamelCase=True					,       __lowerCamelCase="[UNK]"					,       __lowerCamelCase="[SEP]"					,       __lowerCamelCase="[PAD]"					,       __lowerCamelCase="[CLS]"					,       __lowerCamelCase="[MASK]"					,       __lowerCamelCase="[QUESTION]"					,       __lowerCamelCase=True					,       __lowerCamelCase=None					,       **__lowerCamelCase					,       ):




         '''simple docstring'''



         super().__init__(
             lowercase__					,       tokenizer_file=lowercase__					,       do_lower_case=lowercase__					,       unk_token=lowercase__					,       sep_token=lowercase__					,       pad_token=lowercase__					,       cls_token=lowercase__					,       mask_token=lowercase__					,       tokenize_chinese_chars=lowercase__					,       strip_accents=lowercase__					,       additional_special_tokens=(question_token,)					,       **lowercase__					,       )

         __A					:					Dict								=		json.loads(self.backend_tokenizer.normalizer.__getstate__()	)
         if (
             pre_tok_state.get('lowercase'					,       lowercase__	) != do_lower_case
             or pre_tok_state.get('strip_accents'					,       lowercase__	) != strip_accents
         ):
              __A					:					Union[str, Any]								=		getattr(lowercase__					,       pre_tok_state.pop('type'	)	)
              __A					:					Any								=		do_lower_case
              __A					:					str								=		strip_accents
              __A					:					Optional[int]								=		pre_tok_class(**lowercase__	)

         __A					:					List[str]								=		do_lower_case
    @property
    def 						_a							(  self	):




         '''simple docstring'''



         return self.convert_tokens_to_ids(self.question_token	)
    def 						_a							(  self					,       __lowerCamelCase					,       __lowerCamelCase = None	):




         '''simple docstring'''



         if token_ids_a is None:
              return [self.cls_token_id] + token_ids_a + [self.sep_token_id]

         __A					:					Dict								=		[self.cls_token_id]
         __A					:					Dict								=		[self.sep_token_id]
         __A					:					List[Any]								=		[self.question_token_id] + [self.convert_tokens_to_ids('.'	)]
         if self.padding_side == "right":
              # Input is question-then-context
              return cls + token_ids_a + question_suffix + sep + token_ids_a + sep
         else:
              # Input is context-then-question
              return cls + token_ids_a + sep + token_ids_a + question_suffix + sep
    def 						_a							(  self					,       __lowerCamelCase					,       __lowerCamelCase = None	):




         '''simple docstring'''



         __A					:					str								=		[self.sep_token_id]
         __A					:					Union[str, Any]								=		[self.cls_token_id]
         __A					:					Tuple								=		[self.question_token_id] + [self.convert_tokens_to_ids('.'	)]
         if token_ids_a is None:
              return len(cls + token_ids_a + sep	) * [0]

         if self.padding_side == "right":
              # Input is question-then-context
              return len(cls + token_ids_a + question_suffix + sep	) * [0] + len(token_ids_a + sep	) * [1]
         else:
              # Input is context-then-question
              return len(cls + token_ids_a + sep	) * [0] + len(token_ids_a + question_suffix + sep	) * [1]

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




         '''simple docstring'''



         __A					:					Optional[Any]								=		self._tokenizer.model.save(lowercase__					,       name=lowercase__	)
         return tuple(lowercase__	)










'''simple docstring'''

def  _a     (				lowerCAmelCase_ = 4_000_000						):





      """simple docstring"""



      _snake_case		:						Optional[int]         =  1
      _snake_case		:						Tuple         =  2
      _snake_case		:						Optional[Any]         =  0
      while j <= n:
            if j % 2 == 0:
                  total += j
            _snake_case  ,				_snake_case		:						str         =  j, i + j

      return total


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


