





"""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_funnel import FunnelTokenizer


a						: str     	=			logging.get_logger(__name__)

a						: int     	=			{'''vocab_file''': '''vocab.txt''', '''tokenizer_file''': '''tokenizer.json'''}

a						: Dict     	=			[
    '''small''',
    '''small-base''',
    '''medium''',
    '''medium-base''',
    '''intermediate''',
    '''intermediate-base''',
    '''large''',
    '''large-base''',
    '''xlarge''',
    '''xlarge-base''',
]

a						: Optional[Any]     	=			{
    '''vocab_file''': {
        '''funnel-transformer/small''': '''https://huggingface.co/funnel-transformer/small/resolve/main/vocab.txt''',
        '''funnel-transformer/small-base''': '''https://huggingface.co/funnel-transformer/small-base/resolve/main/vocab.txt''',
        '''funnel-transformer/medium''': '''https://huggingface.co/funnel-transformer/medium/resolve/main/vocab.txt''',
        '''funnel-transformer/medium-base''': (
            '''https://huggingface.co/funnel-transformer/medium-base/resolve/main/vocab.txt'''
        ),
        '''funnel-transformer/intermediate''': (
            '''https://huggingface.co/funnel-transformer/intermediate/resolve/main/vocab.txt'''
        ),
        '''funnel-transformer/intermediate-base''': (
            '''https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/vocab.txt'''
        ),
        '''funnel-transformer/large''': '''https://huggingface.co/funnel-transformer/large/resolve/main/vocab.txt''',
        '''funnel-transformer/large-base''': '''https://huggingface.co/funnel-transformer/large-base/resolve/main/vocab.txt''',
        '''funnel-transformer/xlarge''': '''https://huggingface.co/funnel-transformer/xlarge/resolve/main/vocab.txt''',
        '''funnel-transformer/xlarge-base''': (
            '''https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/vocab.txt'''
        ),
    },
    '''tokenizer_file''': {
        '''funnel-transformer/small''': '''https://huggingface.co/funnel-transformer/small/resolve/main/tokenizer.json''',
        '''funnel-transformer/small-base''': (
            '''https://huggingface.co/funnel-transformer/small-base/resolve/main/tokenizer.json'''
        ),
        '''funnel-transformer/medium''': '''https://huggingface.co/funnel-transformer/medium/resolve/main/tokenizer.json''',
        '''funnel-transformer/medium-base''': (
            '''https://huggingface.co/funnel-transformer/medium-base/resolve/main/tokenizer.json'''
        ),
        '''funnel-transformer/intermediate''': (
            '''https://huggingface.co/funnel-transformer/intermediate/resolve/main/tokenizer.json'''
        ),
        '''funnel-transformer/intermediate-base''': (
            '''https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/tokenizer.json'''
        ),
        '''funnel-transformer/large''': '''https://huggingface.co/funnel-transformer/large/resolve/main/tokenizer.json''',
        '''funnel-transformer/large-base''': (
            '''https://huggingface.co/funnel-transformer/large-base/resolve/main/tokenizer.json'''
        ),
        '''funnel-transformer/xlarge''': '''https://huggingface.co/funnel-transformer/xlarge/resolve/main/tokenizer.json''',
        '''funnel-transformer/xlarge-base''': (
            '''https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/tokenizer.json'''
        ),
    },
}
a						: Optional[int]     	=			{F'''funnel-transformer/{name}''': 512 for name in _model_names}
a						: List[str]     	=			{F'''funnel-transformer/{name}''': {'''do_lower_case''': True} for name in _model_names}


class        __UpperCamelCase				(						a__						):
							lowerCamelCase   :					Optional[Any]      					=VOCAB_FILES_NAMES
							lowerCamelCase   :					Optional[Any]      					=PRETRAINED_VOCAB_FILES_MAP
							lowerCamelCase   :					int      					=PRETRAINED_INIT_CONFIGURATION
							lowerCamelCase   :					List[str]      					=FunnelTokenizer
							lowerCamelCase   :					List[Any]      					=PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
							lowerCamelCase   :					int      					=2






							def __init__(   self      ,					lowerCAmelCase__=None      ,					lowerCAmelCase__=None      ,					lowerCAmelCase__=True      ,					lowerCAmelCase__="<unk>"      ,					lowerCAmelCase__="<sep>"      ,					lowerCAmelCase__="<pad>"      ,					lowerCAmelCase__="<cls>"      ,					lowerCAmelCase__="<mask>"      ,					lowerCAmelCase__="<s>"      ,					lowerCAmelCase__="</s>"      ,					lowerCAmelCase__=True      ,					lowerCAmelCase__=True      ,					lowerCAmelCase__=None      ,					lowerCAmelCase__="##"      ,					**lowerCAmelCase__      ,					)	-> int:
								super().__init__(
								    lowerCAmelCase__      ,					tokenizer_file=lowerCAmelCase__      ,					do_lower_case=lowerCAmelCase__      ,					unk_token=lowerCAmelCase__      ,					sep_token=lowerCAmelCase__      ,					pad_token=lowerCAmelCase__      ,					cls_token=lowerCAmelCase__      ,					mask_token=lowerCAmelCase__      ,					bos_token=lowerCAmelCase__      ,					eos_token=lowerCAmelCase__      ,					clean_text=lowerCAmelCase__      ,					tokenize_chinese_chars=lowerCAmelCase__      ,					strip_accents=lowerCAmelCase__      ,					wordpieces_prefix=lowerCAmelCase__      ,					**lowerCAmelCase__      ,					)

								a      :		Union[str, Any]	=				json.loads(self.backend_tokenizer.normalizer.__getstate__()      )
								if (
								    normalizer_state.get("lowercase"      ,					lowerCAmelCase__      ) != do_lower_case
								    or normalizer_state.get("strip_accents"      ,					lowerCAmelCase__      ) != strip_accents
								    or normalizer_state.get("handle_chinese_chars"      ,					lowerCAmelCase__      ) != tokenize_chinese_chars
								):
									a      :		Dict	=				getattr(lowerCAmelCase__      ,					normalizer_state.pop("type"      )      )
									a      :		int	=				do_lower_case
									a      :		List[Any]	=				strip_accents
									a      :		Optional[Any]	=				tokenize_chinese_chars
									a      :		List[Any]	=				normalizer_class(**lowerCAmelCase__      )

								a      :		str	=				do_lower_case






							def     __a   (   self      ,					lowerCAmelCase__      ,					lowerCAmelCase__=None      )	-> Any:
								a      :		List[str]	=				[self.cls_token_id] + token_ids_a + [self.sep_token_id]

								if token_ids_a:
									output += token_ids_a + [self.sep_token_id]

								return output






							def     __a   (   self      ,					lowerCAmelCase__      ,					lowerCAmelCase__ = None      )	-> List[int]:
								a      :		List[Any]	=				[self.sep_token_id]
								a      :		Union[str, Any]	=				[self.cls_token_id]
								if token_ids_a is None:
									return len(cls      ) * [self.cls_token_type_id] + len(token_ids_a + sep      ) * [0]
								return len(cls      ) * [self.cls_token_type_id] + len(token_ids_a + sep      ) * [0] + len(token_ids_a + sep      ) * [1]






							def     __a   (   self      ,					lowerCAmelCase__      ,					lowerCAmelCase__ = None      )	-> Tuple[str]:
								a      :		Optional[Any]	=				self._tokenizer.model.save(lowerCAmelCase__      ,					name=lowerCAmelCase__      )
								return tuple(lowerCAmelCase__      )









"""simple docstring"""




def       _SCREAMING_SNAKE_CASE		(	_lowercase						:    float    ,       _lowercase						:    float					) ->float:






	'''simple docstring'''






	return price * (1 + tax_rate)


if __name__ == "__main__":
		print(F'''{price_plus_tax(100, 0.25) = }''')
		print(F'''{price_plus_tax(125.50, 0.05) = }''')


