
from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase__				:  str       					=				logging.get_logger(__name__)

UpperCAmelCase__				:  Optional[int]       					=				{
    """tau/splinter-base""": """https://huggingface.co/tau/splinter-base/resolve/main/config.json""",
    """tau/splinter-base-qass""": """https://huggingface.co/tau/splinter-base-qass/resolve/main/config.json""",
    """tau/splinter-large""": """https://huggingface.co/tau/splinter-large/resolve/main/config.json""",
    """tau/splinter-large-qass""": """https://huggingface.co/tau/splinter-large-qass/resolve/main/config.json""",
    # See all Splinter models at https://huggingface.co/models?filter=splinter
}



class 			UpperCamelCase_			(						a_   ):




							'''simple docstring'''

							UpperCamelCase_						   =							'splinter'
							def __init__(				self     ,						UpperCamelCase=3_05_22     ,						UpperCamelCase=7_68     ,						UpperCamelCase=12     ,						UpperCamelCase=12     ,						UpperCamelCase=30_72     ,						UpperCamelCase="gelu"     ,						UpperCamelCase=0.1     ,						UpperCamelCase=0.1     ,						UpperCamelCase=5_12     ,						UpperCamelCase=2     ,						UpperCamelCase=0.02     ,						UpperCamelCase=1E-12     ,						UpperCamelCase=True     ,						UpperCamelCase=0     ,						UpperCamelCase=1_04     ,						**UpperCamelCase     ,						) ->	Optional[Any]:
										super().__init__(pad_token_id=_snake_case     ,						**_snake_case)

										UpperCamelCase__    :		List[Any]     =				vocab_size
										UpperCamelCase__    :		Optional[int]     =				max_position_embeddings
										UpperCamelCase__    :		Union[str, Any]     =				hidden_size
										UpperCamelCase__    :		Tuple     =				num_hidden_layers
										UpperCamelCase__    :		List[Any]     =				num_attention_heads
										UpperCamelCase__    :		Tuple     =				intermediate_size
										UpperCamelCase__    :		List[str]     =				hidden_act
										UpperCamelCase__    :		Optional[Any]     =				hidden_dropout_prob
										UpperCamelCase__    :		List[Any]     =				attention_probs_dropout_prob
										UpperCamelCase__    :		Dict     =				initializer_range
										UpperCamelCase__    :		Any     =				type_vocab_size
										UpperCamelCase__    :		Optional[Any]     =				layer_norm_eps
										UpperCamelCase__    :		List[str]     =				use_cache
										UpperCamelCase__    :		Dict     =				question_token_id





import numpy as np

UpperCAmelCase__				:  str       					=				[
    ['''a''', '''b''', '''c''', '''d''', '''e'''],
    ['''f''', '''g''', '''h''', '''i''', '''k'''],
    ['''l''', '''m''', '''n''', '''o''', '''p'''],
    ['''q''', '''r''', '''s''', '''t''', '''u'''],
    ['''v''', '''w''', '''x''', '''y''', '''z'''],
]



class 			UpperCamelCase_			:




							'''simple docstring'''

							def __init__(				self) ->	None:
										UpperCamelCase__    :		Any     =				np.array(UpperCamelCase)
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	np.ndarray:
										UpperCamelCase__   ,			UpperCamelCase__    :		Optional[int]     =				np.where(letter == self.SQUARE)
										UpperCamelCase__    :		int     =				np.concatenate([indexa + 1, indexa + 1])
										return indexes
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase     ,						UpperCamelCase) ->	str:
										return self.SQUARE[indexa - 1, indexa - 1]
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	str:
										UpperCamelCase__    :		str     =				message.lower()
										UpperCamelCase__    :		int     =				message.replace('j'     ,						'i')

										UpperCamelCase__    :		List[Any]     =				''
										for letter_index in range(len(UpperCamelCase)):
													if message[letter_index] != " ":
																UpperCamelCase__    :		Union[str, Any]     =				self.letter_to_numbers(message[letter_index])
																UpperCamelCase__    :		int     =				encoded_message + str(numbers[0]) + str(numbers[1])
													elif message[letter_index] == " ":
																UpperCamelCase__    :		str     =				encoded_message + ' '

										return encoded_message






							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	str:
										UpperCamelCase__    :		Union[str, Any]     =				message.replace(' '     ,						'  ')
										UpperCamelCase__    :		int     =				''
										for numbers_index in range(int(len(UpperCamelCase) / 2)):
													if message[numbers_index * 2] != " ":
																UpperCamelCase__    :		List[str]     =				message[numbers_index * 2]
																UpperCamelCase__    :		Tuple     =				message[numbers_index * 2 + 1]

																UpperCamelCase__    :		Tuple     =				self.numbers_to_letter(int(UpperCamelCase)     ,						int(UpperCamelCase))
																UpperCamelCase__    :		List[str]     =				decoded_message + letter
													elif message[numbers_index * 2] == " ":
																UpperCamelCase__    :		str     =				decoded_message + ' '

										return decoded_message



