Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syllabify rules #6

Open
abithyzis opened this issue Jul 19, 2018 · 1 comment
Open

Syllabify rules #6

abithyzis opened this issue Jul 19, 2018 · 1 comment

Comments

@abithyzis
Copy link

abithyzis commented Jul 19, 2018

I think you are missing some values in your is_diphthong and is_valid_consonant_cluster to give better results.
Edit: I just realized this is for ancient Greek and my use case is modern Greek, so I am not sure my changes will apply.
I also wrote a bad test to make sure I follow the consensus on syllabifying.

Let me know if you want a pull request, or I can just paste them here.

@abithyzis
Copy link
Author

abithyzis commented Jul 27, 2018

There are a few consonant clusters missing so I am copying the whole function

def is_valid_consonant_cluster(b, c):
    s = base(b).lower() + ("".join(base(b2) for b2 in c)).lower()
    return s.startswith((
        "βδ", "βλ", "βρ",
        "γλ", "γν", "γρ", "γκ",
        "δρ",
        "θλ", "θν", "θρ",
        "κλ", "κν", "κρ", "κτ",
        "μν", "μπ",
        "ντ",
        "πλ", "πν", "πρ", "πτ",
        "σβ", "σθ", "σκ", "σμ", "σπ", "στ", "σφ", "σχ", "στρ",
        "τρ", "τμ", "τσ", "τζ",
        "φθ", "φλ", "φρ", "φτ",
        "χθ", "χλ", "χρ", "χτ",
    ))

Regarding diphthongs, things are not very clear (they are called digraphs-δίψηφα now)

def is_diphthong(chs):
    return base(chs[0]).lower() + base(chs[1]).lower() in [
        "αι", "ει", "οι", "υι",
        "αυ", "ευ", "ου", "ηυ",
        "αη", "οη",
        "αου",
        "ια", "υα", "εια", "οια",
        "ιο",
    ] and not diaeresis(chs[1])

These are changes for modern Greek so I am not sure if they are relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant