


class 					lowerCAmelCase_ :




						def __init__(	self						:   Optional[Any]						)      ->Union[str, Any]:






									"""simple docstring"""






									a__ :str						  =    ""
									a__ :List[str]						  =    ""
									a__ :List[Any]						  =    []




						def  _snake_case					(	self						:   str   ,     __A						:   int   ,     __A						:   int						)      ->int:






									"""simple docstring"""






									if m == -1:
												return n + 1
									elif n == -1:
												return m + 1
									elif self.dp[m][n] > -1:
												return self.dp[m][n]
									else:
												if self.worda[m] == self.worda[n]:
															a__ :List[str]						  =    self.__min_dist_top_down_dp(m - 1   ,     n - 1						)
												else:
															a__ :str						  =    self.__min_dist_top_down_dp(__A   ,     n - 1						)
															a__ :Optional[Any]						  =    self.__min_dist_top_down_dp(m - 1   ,     __A						)
															a__ :Any						  =    self.__min_dist_top_down_dp(m - 1   ,     n - 1						)
															a__ :Dict						  =    1 + min(__A   ,     __A   ,     __A						)

												return self.dp[m][n]




						def  _snake_case					(	self						:   str   ,     __A						:   str   ,     __A						:   str						)      ->int:






									"""simple docstring"""






									a__ :Tuple						  =    worda
									a__ :Union[str, Any]						  =    worda
									a__ :Dict						  =    [[-1 for _ in range(len(__A						)						)] for _ in range(len(__A						)						)]

									return self.__min_dist_top_down_dp(len(__A						) - 1   ,     len(__A						) - 1						)






						def  _snake_case					(	self						:   List[Any]   ,     __A						:   str   ,     __A						:   str						)      ->int:






									"""simple docstring"""






									a__ :Tuple						  =    worda
									a__ :Dict						  =    worda
									a__ :Union[str, Any]						  =    len(__A						)
									a__ :Any						  =    len(__A						)
									a__ :Dict						  =    [[0 for _ in range(n + 1						)] for _ in range(m + 1						)]

									for i in range(m + 1						):
												for j in range(n + 1						):
															if i == 0:  # first string is empty
																		a__ :Optional[int]						  =    j
															elif j == 0:  # second string is empty
																		a__ :Union[str, Any]						  =    i
															elif worda[i - 1] == worda[j - 1]:  # last characters are equal
																		a__ :Optional[Any]						  =    self.dp[i - 1][j - 1]
															else:
																		a__ :int						  =    self.dp[i][j - 1]
																		a__ :str						  =    self.dp[i - 1][j]
																		a__ :List[Any]						  =    self.dp[i - 1][j - 1]
																		a__ :Any						  =    1 + min(__A   ,     __A   ,     __A						)
									return self.dp[m][n]


if __name__ == "__main__":
		snake_case__			 =						EditDistance()

		print('''****************** Testing Edit Distance DP Algorithm ******************''')
		print()

		snake_case__			 =						input('''Enter the first string: ''').strip()
		snake_case__			 =						input('''Enter the second string: ''').strip()

		print()
		print(f'''The minimum edit distance is: {solver.min_dist_top_down(Sa, Sa)}''')
		print(f'''The minimum edit distance is: {solver.min_dist_bottom_up(Sa, Sa)}''')
		print()
		print('''*************** End of Testing Edit Distance DP Algorithm ***************''')






from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig


snake_case__			 =						{
    '''albert-base-v1''': '''https://huggingface.co/albert-base-v1/resolve/main/config.json''',
    '''albert-large-v1''': '''https://huggingface.co/albert-large-v1/resolve/main/config.json''',
    '''albert-xlarge-v1''': '''https://huggingface.co/albert-xlarge-v1/resolve/main/config.json''',
    '''albert-xxlarge-v1''': '''https://huggingface.co/albert-xxlarge-v1/resolve/main/config.json''',
    '''albert-base-v2''': '''https://huggingface.co/albert-base-v2/resolve/main/config.json''',
    '''albert-large-v2''': '''https://huggingface.co/albert-large-v2/resolve/main/config.json''',
    '''albert-xlarge-v2''': '''https://huggingface.co/albert-xlarge-v2/resolve/main/config.json''',
    '''albert-xxlarge-v2''': '''https://huggingface.co/albert-xxlarge-v2/resolve/main/config.json''',
}


class 					lowerCAmelCase_ (       _a):
						lowerCamelCase_         =     'albert'




						def __init__(	self						:   Any   ,     __A						:   Optional[int]=30000   ,     __A						:   List[str]=128   ,     __A						:   int=4096   ,     __A						:   Any=12   ,     __A						:   Union[str, Any]=1   ,     __A						:   Optional[int]=64   ,     __A						:   Dict=16384   ,     __A						:   List[str]=1   ,     __A						:   Any="gelu_new"   ,     __A						:   List[Any]=0   ,     __A						:   str=0   ,     __A						:   List[str]=512   ,     __A						:   Optional[Any]=2   ,     __A						:   Tuple=0.02   ,     __A						:   int=1E-12   ,     __A						:   str=0.1   ,     __A						:   Optional[Any]="absolute"   ,     __A						:   Tuple=0   ,     __A						:   str=2   ,     __A						:   Union[str, Any]=3   ,     **__A						:   Union[str, Any]   ,     )      ->str:






									"""simple docstring"""






									super().__init__(pad_token_id=__A   ,     bos_token_id=__A   ,     eos_token_id=__A   ,     **__A						)

									a__ :Tuple						  =    vocab_size
									a__ :Dict						  =    embedding_size
									a__ :Union[str, Any]						  =    hidden_size
									a__ :int						  =    num_hidden_layers
									a__ :List[Any]						  =    num_hidden_groups
									a__ :str						  =    num_attention_heads
									a__ :Optional[Any]						  =    inner_group_num
									a__ :Any						  =    hidden_act
									a__ :Optional[int]						  =    intermediate_size
									a__ :Optional[Any]						  =    hidden_dropout_prob
									a__ :Optional[int]						  =    attention_probs_dropout_prob
									a__ :int						  =    max_position_embeddings
									a__ :List[Any]						  =    type_vocab_size
									a__ :Dict						  =    initializer_range
									a__ :Optional[int]						  =    layer_norm_eps
									a__ :Optional[Any]						  =    classifier_dropout_prob
									a__ :Optional[Any]						  =    position_embedding_type






class 					lowerCAmelCase_ (       _a):




						@property
						def  _snake_case					(	self						:   Optional[int]						)      ->Mapping[str, Mapping[int, str]]:






									"""simple docstring"""






									if self.task == "multiple-choice":
												a__ :List[Any]						  =    {0: "batch", 1: "choice", 2: "sequence"}
									else:
												a__ :Dict						  =    {0: "batch", 1: "sequence"}
									return OrderedDict(
									    [
									        ("input_ids", dynamic_axis),
									        ("attention_mask", dynamic_axis),
									        ("token_type_ids", dynamic_axis),
									    ]						)


