


import os

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


__snake_case             =	logging.get_logger(__name__)



class   __lowerCamelCase (_a	):







       def __init__( self:   int,A_:   Any,A_:   Union[str, Any]=None				):






            '''simple docstring'''




            __UpperCamelCase   = language
            __UpperCamelCase   = train_language







       def 		snake_case_  ( self:   Tuple,A_:   str				):






            '''simple docstring'''




            __UpperCamelCase   = self.language if self.train_language is None else self.train_language
            __UpperCamelCase   = self._read_tsv(os.path.join(A_,F'''XNLI-MT-1.0/multinli/multinli.train.{lg}.tsv'''				)				)
            __UpperCamelCase   = []
            for i, line in enumerate(A_				):
                 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(A_,A_				):
                      raise ValueError(F'''Training input {text_a} is not a string'''				)
                 if not isinstance(A_,A_				):
                      raise ValueError(F'''Training input {text_b} is not a string'''				)
                 if not isinstance(A_,A_				):
                      raise ValueError(F'''Training label {label} is not a string'''				)
                 examples.append(InputExample(guid=A_,text_a=A_,text_b=A_,label=A_				)				)
            return examples







       def 		snake_case_  ( self:   int,A_:   List[Any]				):






            '''simple docstring'''




            __UpperCamelCase   = self._read_tsv(os.path.join(A_,'XNLI-1.0/xnli.test.tsv'				)				)
            __UpperCamelCase   = []
            for i, line in enumerate(A_				):
                 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(A_,A_				):
                      raise ValueError(F'''Training input {text_a} is not a string'''				)
                 if not isinstance(A_,A_				):
                      raise ValueError(F'''Training input {text_b} is not a string'''				)
                 if not isinstance(A_,A_				):
                      raise ValueError(F'''Training label {label} is not a string'''				)
                 examples.append(InputExample(guid=A_,text_a=A_,text_b=A_,label=A_				)				)
            return examples







       def 		snake_case_  ( self:   Dict				):






            '''simple docstring'''




            return ["contradiction", "entailment", "neutral"]



__snake_case             =	{
    '''xnli''': XnliProcessor,
}

__snake_case             =	{
    '''xnli''': '''classification''',
}

__snake_case             =	{
    '''xnli''': 3,
}






from math import cos, sin






def 		_A		(		_lowercase   )				->   list[list[float]]:


     """simple docstring"""


     __UpperCamelCase   = float(_lowercase   )
     return [[scaling_factor * int(x == y   ) for x in range(2   )] for y in range(2   )]






def 		_A		(		_lowercase   )				->   list[list[float]]:


     """simple docstring"""


     __UpperCamelCase,						__UpperCamelCase   = cos(_lowercase   ), sin(_lowercase   )
     return [[c, -s], [s, c]]






def 		_A		(		_lowercase   )				->   list[list[float]]:


     """simple docstring"""


     __UpperCamelCase,						__UpperCamelCase   = cos(_lowercase   ), sin(_lowercase   )
     __UpperCamelCase   = c * s
     return [[c * c, cs], [cs, s * s]]






def 		_A		(		_lowercase   )				->   list[list[float]]:


     """simple docstring"""


     __UpperCamelCase,						__UpperCamelCase   = cos(_lowercase   ), sin(_lowercase   )
     __UpperCamelCase   = c * s
     return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(f"""    {scaling(5) = }""")
print(f"""  {rotation(4_5) = }""")
print(f"""{projection(4_5) = }""")


print(f"""{reflection(4_5) = }""")


