



"""simple docstring"""






_lowercase			:			Optional[int]										=						{
    'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.',
    'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.',
    'O': '---', 'P': '.--.', 'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', 'U': '..-',
    'V': '...-', 'W': '.--', 'X': '-..-', 'Y': '-.--', 'Z': '--..', '1': '.----',
    '2': '..---', '3': '...--', '4': '....-', '5': '.....', '6': '-....', '7': '--...',
    '8': '---..', '9': '----.', '0': '-----', '&': '.-...', '@': '.--.-.',
    ':': '---...', ',': '--..--', '.': '.-.-.-', '\'': '.----.', '"': '.-..-.',
    '?': '..--..', '/': '-..-.', '=': '-...-', '+': '.-.-.', '-': '-....-',
    '(': '-.--.', ')': '-.--.-', '!': '-.-.--', ' ': '/'
}  # Exclamation mark is not in ITU-R recommendation
# fmt: on
_lowercase			:			Optional[Any]										=						{value: key for key, value in MORSE_CODE_DICT.items()}






def 					snake_case__       (		__lowerCamelCase    :   Optional[int]     ):
			"""simple docstring"""
			return " ".join(MORSE_CODE_DICT[char] for char in message.upper()     )






def 					snake_case__       (		__lowerCamelCase    :   Any     ):
			"""simple docstring"""
			return "".join(REVERSE_DICT[char] for char in message.split()     )






def 					snake_case__       (		):
			"""simple docstring"""
			lowerCamelCase__		:		Optional[int]		     ='Morse code here!'
			print(_UpperCAmelCase     )
			lowerCamelCase__		:		Optional[Any]		     =encrypt(_UpperCAmelCase     )
			print(_UpperCAmelCase     )
			lowerCamelCase__		:		Union[str, Any]		     =decrypt(_UpperCAmelCase     )
			print(_UpperCAmelCase     )


if __name__ == "__main__":
		main()









"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


_lowercase			:			Any										=						{
    "configuration_trocr": ["TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP", "TrOCRConfig"],
    "processing_trocr": ["TrOCRProcessor"],
}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase			:			List[Any]										=						[
		    "TROCR_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "TrOCRForCausalLM",
		    "TrOCRPreTrainedModel",
		]


if TYPE_CHECKING:
		from .configuration_trocr import TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP, TrOCRConfig
		from .processing_trocr import TrOCRProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_trocr import TROCR_PRETRAINED_MODEL_ARCHIVE_LIST, TrOCRForCausalLM, TrOCRPreTrainedModel

else:
		import sys

		_lowercase			:			Tuple										=						_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




