




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


UpperCamelCase__     =	logging.get_logger(__name__)

UpperCamelCase__     =	{
    "microsoft/markuplm-base": "https://huggingface.co/microsoft/markuplm-base/resolve/main/config.json",
    "microsoft/markuplm-large": "https://huggingface.co/microsoft/markuplm-large/resolve/main/config.json",
}

class     __SCREAMING_SNAKE_CASE   (       A__    ):
							snake_case       : Any         =    """markuplm"""






							def __init__(  self					,	__lowerCAmelCase=30522					,	__lowerCAmelCase=768					,	__lowerCAmelCase=12					,	__lowerCAmelCase=12					,	__lowerCAmelCase=3072					,	__lowerCAmelCase="gelu"					,	__lowerCAmelCase=0.1					,	__lowerCAmelCase=0.1					,	__lowerCAmelCase=512					,	__lowerCAmelCase=2					,	__lowerCAmelCase=0.02					,	__lowerCAmelCase=1E-12					,	__lowerCAmelCase=0					,	__lowerCAmelCase=0					,	__lowerCAmelCase=2					,	__lowerCAmelCase=256					,	__lowerCAmelCase=1024					,	__lowerCAmelCase=216					,	__lowerCAmelCase=1001					,	__lowerCAmelCase=32					,	__lowerCAmelCase=50					,	__lowerCAmelCase="absolute"					,	__lowerCAmelCase=True					,	__lowerCAmelCase=None					,	**__lowerCAmelCase					,	):
														super().__init__(
														    pad_token_id=__snake_case					,	bos_token_id=__snake_case					,	eos_token_id=__snake_case					,	**__snake_case					,	)
														UpperCamelCase__			       =     vocab_size
														UpperCamelCase__			       =     hidden_size
														UpperCamelCase__			       =     num_hidden_layers
														UpperCamelCase__			       =     num_attention_heads
														UpperCamelCase__			       =     hidden_act
														UpperCamelCase__			       =     intermediate_size
														UpperCamelCase__			       =     hidden_dropout_prob
														UpperCamelCase__			       =     attention_probs_dropout_prob
														UpperCamelCase__			       =     max_position_embeddings
														UpperCamelCase__			       =     type_vocab_size
														UpperCamelCase__			       =     initializer_range
														UpperCamelCase__			       =     layer_norm_eps
														UpperCamelCase__			       =     position_embedding_type
														UpperCamelCase__			       =     use_cache
														UpperCamelCase__			       =     classifier_dropout
														# additional properties
														UpperCamelCase__			       =     max_depth
														UpperCamelCase__			       =     max_xpath_tag_unit_embeddings
														UpperCamelCase__			       =     max_xpath_subs_unit_embeddings
														UpperCamelCase__			       =     tag_pad_id
														UpperCamelCase__			       =     subs_pad_id
														UpperCamelCase__			       =     xpath_unit_hidden_size











UpperCamelCase__     =	{
    "meter": "m",
    "kilometer": "km",
    "megametre": "Mm",
    "gigametre": "Gm",
    "terametre": "Tm",
    "petametre": "Pm",
    "exametre": "Em",
    "zettametre": "Zm",
    "yottametre": "Ym",
}
# Exponent of the factor(meter)
UpperCamelCase__     =	{
    "m": 0,
    "km": 3,
    "Mm": 6,
    "Gm": 9,
    "Tm": 12,
    "Pm": 15,
    "Em": 18,
    "Zm": 21,
    "Ym": 24,
}





def       _UpperCamelCase       (a__				:float				,     a__				:str				,     a__				:str    ):






							"""simple docstring"""





							UpperCamelCase__			       =     from_type.lower().strip("""s"""    )
							UpperCamelCase__			       =     to_type.lower().strip("""s"""    )

							UpperCamelCase__			       =     UNIT_SYMBOL.get(a__				,     a__    )
							UpperCamelCase__			       =     UNIT_SYMBOL.get(a__				,     a__    )

							if from_sanitized not in METRIC_CONVERSION:
														UpperCamelCase__			       =     (
														    f"""Invalid 'from_type' value: {from_type!r}.\n"""
														    f"""Conversion abbreviations are: {", ".join(a__    )}"""
														)
														raise ValueError(a__    )
							if to_sanitized not in METRIC_CONVERSION:
														UpperCamelCase__			       =     (
														    f"""Invalid 'to_type' value: {to_type!r}.\n"""
														    f"""Conversion abbreviations are: {", ".join(a__    )}"""
														)
														raise ValueError(a__    )
							UpperCamelCase__			       =     METRIC_CONVERSION[from_sanitized]
							UpperCamelCase__			       =     METRIC_CONVERSION[to_sanitized]
							UpperCamelCase__			       =     1

							if from_exponent > to_exponent:
														UpperCamelCase__			       =     from_exponent - to_exponent
							else:
														UpperCamelCase__			       =     -(to_exponent - from_exponent)

							return value * pow(10				,     a__    )


if __name__ == "__main__":
					from doctest import testmod

					testmod()




