|
import json |
|
|
|
|
|
|
|
|
|
|
|
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. |
|
""" |
|
|
|
if reverse: |
|
hebrew_alphabet = hebrew_alphabet[::-1] |
|
|
|
|
|
inverted_alphabet = hebrew_alphabet[::-1] |
|
|
|
|
|
temurah_mapping = {orig: inv for orig, inv in zip(hebrew_alphabet, inverted_alphabet)} |
|
|
|
|
|
temurah_text = ''.join(temurah_mapping.get(char, char) for char in text) |
|
|
|
return temurah_text |
|
|
|
|
|
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) |
|
|
|
|
|
return res |
|
|
|
|