
'''simple docstring'''
import numpy as np

lowerCAmelCase					:    Union[str, Any]           = [
    ['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 			SCREAMING_SNAKE_CASE__      :







				def __init__(       self     )->		None:







											'''simple docstring'''






											UpperCamelCase   			=     np.array(A_     )







				def 						UpperCAmelCase_    (       self						,				A_     )->		np.ndarray:







											'''simple docstring'''






											UpperCamelCase			,	UpperCamelCase   			=     np.where(letter == self.SQUARE     )
											UpperCamelCase   			=     np.concatenate([indexa + 1, indexa + 1]     )
											return indexes







				def 						UpperCAmelCase_    (       self						,				A_						,				A_     )->		str:







											'''simple docstring'''






											UpperCamelCase   			=     self.SQUARE[indexa - 1, indexa - 1]
											return letter







				def 						UpperCAmelCase_    (       self						,				A_     )->		str:







											'''simple docstring'''






											UpperCamelCase   			=     message.lower()
											UpperCamelCase   			=     message.replace(' '						,				''     )
											UpperCamelCase   			=     message.replace('j'						,				'i'     )

											UpperCamelCase   			=     np.empty((2, len(A_     ))     )
											for letter_index in range(len(A_     )     ):
																		UpperCamelCase   			=     self.letter_to_numbers(message[letter_index]     )

																		UpperCamelCase   			=     numbers[0]
																		UpperCamelCase   			=     numbers[1]

											UpperCamelCase   			=     first_step.reshape(2 * len(A_     )     )
											UpperCamelCase   			=     ''
											for numbers_index in range(len(A_     )     ):
																		UpperCamelCase   			=     int(second_step[numbers_index * 2]     )
																		UpperCamelCase   			=     int(second_step[(numbers_index * 2) + 1]     )
																		UpperCamelCase   			=     self.numbers_to_letter(A_						,				A_     )
																		UpperCamelCase   			=     encoded_message + letter

											return encoded_message







				def 						UpperCAmelCase_    (       self						,				A_     )->		str:







											'''simple docstring'''






											UpperCamelCase   			=     message.lower()
											message.replace(' '						,				''     )
											UpperCamelCase   			=     np.empty(2 * len(A_     )     )
											for letter_index in range(len(A_     )     ):
																		UpperCamelCase   			=     self.letter_to_numbers(message[letter_index]     )
																		UpperCamelCase   			=     numbers[0]
																		UpperCamelCase   			=     numbers[1]

											UpperCamelCase   			=     first_step.reshape((2, len(A_     ))     )
											UpperCamelCase   			=     ''
											for numbers_index in range(len(A_     )     ):
																		UpperCamelCase   			=     int(second_step[0, numbers_index]     )
																		UpperCamelCase   			=     int(second_step[1, numbers_index]     )
																		UpperCamelCase   			=     self.numbers_to_letter(A_						,				A_     )
																		UpperCamelCase   			=     decoded_message + letter

											return decoded_message






'''simple docstring'''
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Value
from .base import TaskTemplate


@dataclass(frozen=snake_case_)
class 			SCREAMING_SNAKE_CASE__      (     snake_case_):
				lowerCAmelCase_     			=							field(default="""language-modeling"""							,       metadata={"""include_in_asdict_even_if_is_default""": True})

				lowerCAmelCase_     			=							Features({"""text""": Value("""string""")})
				lowerCAmelCase_     			=							Features({})
				lowerCAmelCase_     			=							"text"







				@property
				def 						UpperCAmelCase_    (       self     )->		Dict[str, str]:







											'''simple docstring'''






											return {self.text_column: "text"}




