


'''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_convbert import ConvBertTokenizer


__snake_case				 =	logging.get_logger(__name__)

__snake_case				 =	{'''vocab_file''': '''vocab.txt'''}

__snake_case				 =	{
    '''vocab_file''': {
        '''YituTech/conv-bert-base''': '''https://huggingface.co/YituTech/conv-bert-base/resolve/main/vocab.txt''',
        '''YituTech/conv-bert-medium-small''': (
            '''https://huggingface.co/YituTech/conv-bert-medium-small/resolve/main/vocab.txt'''
        ),
        '''YituTech/conv-bert-small''': '''https://huggingface.co/YituTech/conv-bert-small/resolve/main/vocab.txt''',
    }
}

__snake_case				 =	{
    '''YituTech/conv-bert-base''': 512,
    '''YituTech/conv-bert-medium-small''': 512,
    '''YituTech/conv-bert-small''': 512,
}


__snake_case				 =	{
    '''YituTech/conv-bert-base''': {'''do_lower_case''': True},
    '''YituTech/conv-bert-medium-small''': {'''do_lower_case''': True},
    '''YituTech/conv-bert-small''': {'''do_lower_case''': True},
}
class   lowercase      (				A__   ):

		"""simple docstring"""

		_a       					=							VOCAB_FILES_NAMES
		_a       					=							PRETRAINED_VOCAB_FILES_MAP
		_a       					=							PRETRAINED_INIT_CONFIGURATION
		_a       					=							PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
		_a       					=							ConvBertTokenizer




		def __init__(						self       ,  UpperCamelCase_=None       ,  UpperCamelCase_=None       ,  UpperCamelCase_=True       ,  UpperCamelCase_="[UNK]"       ,  UpperCamelCase_="[SEP]"       ,  UpperCamelCase_="[PAD]"       ,  UpperCamelCase_="[CLS]"       ,  UpperCamelCase_="[MASK]"       ,  UpperCamelCase_=True       ,  UpperCamelCase_=None       ,  **UpperCamelCase_       ,  ):

							'''simple docstring'''


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

							UpperCamelCase__  :List[Any]				   =					json.loads(self.backend_tokenizer.normalizer.__getstate__()				)
							if (
							    normalizer_state.get('''lowercase'''       ,  UpperCamelCase_				) != do_lower_case
							    or normalizer_state.get('''strip_accents'''       ,  UpperCamelCase_				) != strip_accents
							    or normalizer_state.get('''handle_chinese_chars'''       ,  UpperCamelCase_				) != tokenize_chinese_chars
							):
												UpperCamelCase__  :Optional[int]				   =					getattr(UpperCamelCase_       ,  normalizer_state.pop('''type'''				)				)
												UpperCamelCase__  :int				   =					do_lower_case
												UpperCamelCase__  :List[str]				   =					strip_accents
												UpperCamelCase__  :Tuple				   =					tokenize_chinese_chars
												UpperCamelCase__  :Tuple				   =					normalizer_class(**UpperCamelCase_				)

							UpperCamelCase__  :Tuple				   =					do_lower_case




		def        lowerCAmelCase__							(						self       ,  UpperCamelCase_       ,  UpperCamelCase_=None				):

							'''simple docstring'''


							UpperCamelCase__  :Any				   =					[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        lowerCAmelCase__							(						self       ,  UpperCamelCase_       ,  UpperCamelCase_ = None				):

							'''simple docstring'''


							UpperCamelCase__  :str				   =					[self.sep_token_id]
							UpperCamelCase__  :List[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        lowerCAmelCase__							(						self       ,  UpperCamelCase_       ,  UpperCamelCase_ = None				):

							'''simple docstring'''


							UpperCamelCase__  :int				   =					self._tokenizer.model.save(UpperCamelCase_       ,  name=UpperCamelCase_				)
							return tuple(UpperCamelCase_				)



'''simple docstring'''
from __future__ import annotations

from math import pi, sqrt


def      a (     __a					,   __a  )    ->      tuple:



					'''simple docstring'''






					if inductance <= 0:
										raise ValueError('''Inductance cannot be 0 or negative'''  )

					elif capacitance <= 0:
										raise ValueError('''Capacitance cannot be 0 or negative'''  )

					else:
										return (
										    "Resonant frequency",
										    float(1 / (2 * pi * (sqrt(inductance * capacitance  )))  ),
										)


if __name__ == "__main__":
		import doctest

		doctest.testmod()