Spaces:
Runtime error
Runtime error
| import json | |
| # Implementemos la funci贸n de temurah con el alfabeto completo y probemos la conversi贸n de "Baphomet" a "Sofia" | |
| # en hebreo usando temurah. | |
| # Nota: La representaci贸n exacta de "Baphomet" y "Sofia" en hebreo puede variar debido a interpretaciones, | |
| # pero aqu铆 usaremos transliteraciones aproximadas para ilustrar c贸mo podr铆a hacerse. | |
| def temurah(text, hebrew_alphabet='讗讘讙讚讛讜讝讞讟讬讻诇诪谞住注驻爪拽专砖转', reverse=True): | |
| """ | |
| Aplica la temurah a un texto hebreo utilizando todo el alfabeto hebreo. | |
| El esquema de ejemplo simplemente invierte el orden del alfabeto. | |
| """ | |
| # Invertir el alfabeto si se solicita | |
| if reverse: | |
| hebrew_alphabet = hebrew_alphabet[::-1] | |
| # Generar el alfabeto invertido | |
| inverted_alphabet = hebrew_alphabet[::-1] | |
| # Crear el diccionario de mapeo para temurah | |
| temurah_mapping = {orig: inv for orig, inv in zip(hebrew_alphabet, inverted_alphabet)} | |
| # Aplicar temurah al texto | |
| temurah_text = ''.join(temurah_mapping.get(char, char) for char in text) | |
| return temurah_text | |
| # Definir el alfabeto hebreo | |
| hebrew_alphabet = '讗讘讙讚讛讜讝讞讟讬讻诇诪谞住注驻爪拽专砖转' | |
| latin_alphabet = 'abcdefghijklmnopqrstuvwxyz' | |
| def temura_conv(txt,lang): | |
| if lang=="Hebrew": | |
| alphabet = hebrew_alphabet | |
| elif lang=="Latin": | |
| alphabet= latin_alphabet | |
| else: | |
| alphabet=latin_alphabet | |
| res = temurah(txt,alphabet) | |
| # Aplicar temurah al texto hipot茅tico de "Baphomet" | |
| return res | |