torahCodes/Torah_Codes
4
1import json2# Implementemos la función de temurah con el alfabeto completo y probemos la conversión de "Baphomet" a "Sofia"3# en hebreo usando temurah. 4# Nota: La representación exacta de "Baphomet" y "Sofia" en hebreo puede variar debido a interpretaciones,5# pero aquí usaremos transliteraciones aproximadas para ilustrar cómo podría hacerse.6 7def temurah(text, hebrew_alphabet='אבגדהוזחטיכלמנסעפצקרשת', reverse=True):8 """9 Aplica la temurah a un texto hebreo utilizando todo el alfabeto hebreo.10 El esquema de ejemplo simplemente invierte el orden del alfabeto.11 """12 # Invertir el alfabeto si se solicita13 if reverse:14 hebrew_alphabet = hebrew_alphabet[::-1]15 16 # Generar el alfabeto invertido17 inverted_alphabet = hebrew_alphabet[::-1]18 19 # Crear el diccionario de mapeo para temurah20 temurah_mapping = {orig: inv for orig, inv in zip(hebrew_alphabet, inverted_alphabet)}21 22 # Aplicar temurah al texto23 temurah_text = ''.join(temurah_mapping.get(char, char) for char in text)24 25 return temurah_text26 27# Definir el alfabeto hebreo28hebrew_alphabet = 'אבגדהוזחטיכלמנסעפצקרשת'29 30latin_alphabet = 'abcdefghijklmnopqrstuvwxyz'31 32 33def temura_conv(txt,lang):34 if lang=="Hebrew":35 alphabet = hebrew_alphabet36 elif lang=="Latin":37 alphabet= latin_alphabet38 else:39 alphabet=latin_alphabet40 41 res = temurah(txt,alphabet)42 43 # Aplicar temurah al texto hipotético de "Baphomet"44 return res45 46 