-1

World

# İmport kısmı
# version 0.5 30.08.2023
import pieoffice
import matplotlib
from matplotlib.font_manager import FontProperties

#Çivi yazısını programa aktarma kısmı burada bitiyor.

# Çivi Yazısı Sözlüğü
civi_sozlugu = {
    "V": {
        "a": "",
        "e": "",
        "i": "",
        "u": "",
        "ú": ""
        # Diğer ünlü harfler buraya eklenebilir
    },
    "CV": {
        "ba": "",
        "be": "",
        "bi": "",
        "bu": "",
        "pu": "",
        "pa": "",
        "pé": "",
        "pí": "",
        "da": "",
        "de": "",
        "di": "",
        "du": "",
        "ta": "",
        "te": "",
        "ti": "",
        "tu": "",
        "ga": "",
        "ge": "",
        "gi": "",
        "gu": "",
        "ka": "",
        "ke": "",
        "ki": "",
        "ḫa": "",
        "ḫe": "",
        "ḫé": "",
        "ḫi": "",
        "ḫu": "",
        "la": "",
        "le": "",
        "li": "",
        "lu": "",
        "ma": "",
        "me": "",
        "mé": "",
        "mi": "",
        "mu": "",
        "na": "",
        "ne": "",
        "né": "",
        "ni": "",
        "nu": "",
        "ra": "",
        "re": "",
        "ri": "",
        "ru": "",
        "ša": "",
        "še": "",
        "ši": "",
        "šu": "",
        "šú": "",
        "wa": "",
        "wi5": "",
        "ya": "",
        "za": "",
        "ze": "",
        "zé": "",
        "zi": "",
        "zu": ""
        # Diğer CV harfleri buraya eklenebilir
    },
    "VC": {
        "ab": "",
        "ap": "",
        "ad": "",
        "at": "",
        "ag": "",
        "ak": "",
        "aḫ": "",
        "eḫ": "",
        "iḫ": "",
        "uḫ": "",
        "al": "",
        "am": "",
        "an": "",
        "ar": "",
        "aš": "",
        "az": "",
        "eb": "",
        "ep": "",
        "ib": "",
        "ip": "",
        "ed": "",
        "et": "",
        "id": "",
        "it": "",
        "eg": "",
        "ek": "",
        "ig": "",
        "ik": "",
        "el": "",
        "em": "",
        "im": "",
        "en": "",
        "er": "",
        "ir": "",
        "eš": "",
        "iš": "",
        "ez": "",
        "iz": "",
        "il": "",
        "in": "",
        "ul": "",
        "um": "",
        "un": "",
        "ur": "",
        "úr": "",
        "uš": "",
        "uz": ""
        # Diğer VC harfleri buraya eklenebilir
    },
    # Diğer çekimler buraya eklenebilir
}

belirtec = {
    # Belirteç semboller buraya eklenebilir
    "M": "",
    "I": "",
    "DIDLI": "",
    "DIDLI ḪI.A": "",
    "DINGIR": "",
    "DUG": "",
    "É": "",
    "GAD": "",
    "GI": "",
    "GIŠ": "",
    "GUD": "",
    "ḪI.A": "",
    "ḪUR.SAG": "",
    "ÍD": "",
    "IM": "",
    "ITU": "",
    "KAM": "",
    "KI": "",
    "KU6": "",
    "KUR": "",
    "KUŠ": "",
    "LÚ": "",
    "MEŠ": "",
    "MEŠ ḪI.A": "",
    "MUL": "",
    "MUNUS": "",
    "MUŠ": "",
    "MUŠEN": "",
    "NA4": "",
    "NINDA": "",
    "PÚ": "",
    "SAR": "",
    "SI": "",
    "SÍG": "",
    "TU7": "",
    "TÚG": "",
    "Ú": "",
    "URU": "",
    "URUDU": "",
    "UZU": "",
    # Diğer belirteç semboller buraya eklenebilir
}

# Diğer büyük harfle başlayan heceler buraya eklenebilir

def kelimeyi_civi_yazisina_cevir(kelime):
    civi_kelime = ""
    heceler = kelime.split('-')
    for hece in heceler:
        if hece.upper() in belirtec:
            civi_kelime += belirtec[hece.upper()]
        else:
            for harf in hece:
                if harf in civi_sozlugu["V"]:
                    civi_kelime += civi_sozlugu["V"][harf]
                elif harf in civi_sozlugu["CV"]:
                    civi_kelime += civi_sozlugu["CV"][harf]
                elif harf in civi_sozlugu["VC"]:
                    civi_kelime += civi_sozlugu["VC"][harf]
                else:
                    civi_kelime += harf
    return civi_kelime

# Kullanıcıdan kelimeyi al
kelime = input("Hititçe kelimeyi girin (örneğin: tu-ti-ga): ")

# Kelimeyi çivi yazısına çevir ve yazdır
civi_yazi = kelimeyi_civi_yazisina_cevir(kelime)
print("Çivi Yazısı:", civi_yazi)

and Hello

I made a program to make me feel comfortable in translating a syllabic word into Hittite, but unfortunately the program does not work.

For example, when you write an-na-aş, it should give , but it gives: nnş

There is no problem with Sumerian markers and one-letter syllables, but there is a problem with other syllables. I couldn't quite solve it. By the way, I apologize for the Türkish texts.

For example, when you write an-na-aş, it should give , but it gives: nnş

  • Welcome to Stack Overflow! This is a good opportunity for you to start familiarizing yourself with [using a debugger](https://stackoverflow.com/q/25385173/328193). When you step through the code in a debugger, which operation first produces an unexpected result? What were the values used in that operation? What was the result? What result was expected? Why? To learn more about this community and how we can help you, please start with the [tour] and read [ask] and its linked resources. – David Aug 29 '23 at 21:26
  • 2
    `for harf in hece:` is iterating over each individual character of the string - so "a" followed by "n" at the start of your example. NONE of your dictionary entries with multi-character keys can ever be matched. You're *already* iterating over the dash-separated elements with the `for hece in heceler:` loop; you don't need another loop inside that one. – jasonharper Aug 29 '23 at 21:30

0 Answers0