File size: 1,535 Bytes
			
			| 8332c01 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 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
    
 | 
