


"""simple docstring"""







import os

from ...utils import logging
from .utils import DataProcessor, InputExample


__a      			= logging.get_logger(__name__)
class 				lowerCamelCase							(      __SCREAMING_SNAKE_CASE			):


							"""simple docstring"""






							def __init__(    self			:  Any		,			lowerCamelCase_			:  List[str]		,			lowerCamelCase_			:  Union[str, Any]=None					):
													UpperCAmelCase__												=     language
													UpperCAmelCase__												=     train_language






							def        lowerCAmelCase  (    self			:  Dict		,			lowerCamelCase_			:  Dict					):
													UpperCAmelCase__												=     self.language if self.train_language is None else self.train_language
													UpperCAmelCase__												=     self._read_tsv(os.path.join(lowerCamelCase_		,			f"""XNLI-MT-1.0/multinli/multinli.train.{lg}.tsv"""					)					)
													UpperCAmelCase__												=     []
													for i, line in enumerate(lowerCamelCase_					):
																			if i == 0:
																									continue
																			UpperCAmelCase__												=     f"""train-{i}"""
																			UpperCAmelCase__												=     line[0]
																			UpperCAmelCase__												=     line[1]
																			UpperCAmelCase__												=     '''contradiction''' if line[2] == '''contradictory''' else line[2]
																			if not isinstance(lowerCamelCase_		,			lowerCamelCase_					):
																									raise ValueError(f"""Training input {text_a} is not a string"""					)
																			if not isinstance(lowerCamelCase_		,			lowerCamelCase_					):
																									raise ValueError(f"""Training input {text_b} is not a string"""					)
																			if not isinstance(lowerCamelCase_		,			lowerCamelCase_					):
																									raise ValueError(f"""Training label {label} is not a string"""					)
																			examples.append(InputExample(guid=lowerCamelCase_		,			text_a=lowerCamelCase_		,			text_b=lowerCamelCase_		,			label=lowerCamelCase_					)					)
													return examples






							def        lowerCAmelCase  (    self			:  Tuple		,			lowerCamelCase_			:  str					):
													UpperCAmelCase__												=     self._read_tsv(os.path.join(lowerCamelCase_		,			'''XNLI-1.0/xnli.test.tsv'''					)					)
													UpperCAmelCase__												=     []
													for i, line in enumerate(lowerCamelCase_					):
																			if i == 0:
																									continue
																			UpperCAmelCase__												=     line[0]
																			if language != self.language:
																									continue
																			UpperCAmelCase__												=     f"""test-{i}"""
																			UpperCAmelCase__												=     line[6]
																			UpperCAmelCase__												=     line[7]
																			UpperCAmelCase__												=     line[1]
																			if not isinstance(lowerCamelCase_		,			lowerCamelCase_					):
																									raise ValueError(f"""Training input {text_a} is not a string"""					)
																			if not isinstance(lowerCamelCase_		,			lowerCamelCase_					):
																									raise ValueError(f"""Training input {text_b} is not a string"""					)
																			if not isinstance(lowerCamelCase_		,			lowerCamelCase_					):
																									raise ValueError(f"""Training label {label} is not a string"""					)
																			examples.append(InputExample(guid=lowerCamelCase_		,			text_a=lowerCamelCase_		,			text_b=lowerCamelCase_		,			label=lowerCamelCase_					)					)
													return examples






							def        lowerCAmelCase  (    self			:  Union[str, Any]					):
													return ["contradiction", "entailment", "neutral"]




__a      			= {
    "xnli": XnliProcessor,
}

__a      			= {
    "xnli": "classification",
}

__a      			= {
    "xnli": 3,
}



"""simple docstring"""







def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) * 9 / 5) + 32						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round(float(_UpperCamelCase			) + 273.15						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) * 9 / 5) + 491.67						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) - 32) * 5 / 9						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round(((float(_UpperCamelCase			) - 32) * 5 / 9) + 273.15						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round(float(_UpperCamelCase			) + 459.67						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round(float(_UpperCamelCase			) - 273.15						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round(((float(_UpperCamelCase			) - 273.15) * 9 / 5) + 32						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) * 9 / 5)						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) - 491.67) * 5 / 9						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round(float(_UpperCamelCase			) - 459.67						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) * 5 / 9)						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) * 1.25 + 273.15)						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) * 2.25 + 32)						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) * 1.25)						,      _UpperCamelCase			)






def        a__			(							_UpperCamelCase						,      _UpperCamelCase = 2			):





						"""simple docstring"""

						return round((float(_UpperCamelCase			) * 2.25 + 32 + 459.67)						,      _UpperCamelCase			)


if __name__ == "__main__":
						import doctest

						doctest.testmod()