def transliterate_to_hebrew(english_text, transliteration_dict): hebrew_text = ''.join(transliteration_dict.get(char.lower(), char) for char in english_text) return hebrew_text def generate_common_hebrew_words(): common_hebrew_words = { 'hello': 'shalom', 'goodbye': 'lehitraot', 'please': 'bevakasha', 'thank you': 'todah rabah', 'yes': 'ken', 'no': 'lo', 'sorry': 'slicha', 'excuse me': 'slicha', 'friend': 'chaver', 'family': 'mishpacha', 'love': 'ahava', 'peace': 'shalom', 'good morning': 'boker tov', 'good afternoon': 'tsohorayim tovim', 'good evening': 'erev tov', 'good night': 'laila tov', 'how are you?': 'ma shlomcha?', 'I\'m fine': 'ani beseder', 'what is your name?': 'ma shimcha?', 'my name is': 'shmi', 'where is': 'eifo', 'what time is it?': 'ma ha'sha\'a?', 'today': 'hayom', 'tomorrow': 'machar', 'yesterday': 'etmol', 'water': 'mayim', 'food': 'ochel', 'thank you very much': 'todah rabah meod', 'sorry, I don\'t understand': 'slicha, ani lo mevin', 'please speak more slowly': 'bevakasha, dabri yoter leat' # Add more common words here } return common_hebrew_words def main(): transliteration_dict = generate_common_hebrew_words() # Get input from the user english_input = input("Enter an English word or sentence: ") # Transliterate and print the result hebrew_output = transliterate_to_hebrew(english_input, transliteration_dict) print("Hebrew Equivalent:", hebrew_output) if __name__ == "__main__": main()