-
Notifications
You must be signed in to change notification settings - Fork 326
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
Incorrect syllabification in Greek prosody #1246
Comments
Hello @sjhuskey, Thank you for the report, I'm not the on that developed the syllabifier for Ancient Greek, but I can look at how this can be fixed. The syllabification can be either fixed here in the prosody module for Ancient Greek or done with a specific process. |
Hi @sjhuskey, The syllabifier doesn't syllabify the way you might want, but tries to end a "syllable" with a vowel. Therefore the unusual splitting of syllables, while perhaps undesirable from an academic perspective, seems to be the behaviour desired by the author as described in the comments on the program. When testing this sentence, the first α of ἀρίστων is falling prey to the problem of line 288 (next_syll = sentence[sentence.index(syllable) + 1]) which finds the index of the syllable. It should return an index of 2, and instead returns [0] because it is returning the index of the first syllable 'α' in the sentence. This means it is returning True to _long_by_position case 1. The πα of πάγχρυσον should return True to case 1 (since it is followed by two consonants and not a mute + liquid combination). The phrasing of lines 290—291, however, is:
I think that: should be correct, since the lack of either of these ought to allow for a return True, and it works in this case. I can't think of any undesirable outcomes, but I will look more closely and consult the method in McCabe 1981. As for the γχρυ of πάγχρυσον, I can't think of any way to recognize the length (which ought to be long) without an implementation of a similar dictionary-based macronizer to that in the Latin scansion module. I don't know if a morpheus solution for Greek would work, but something similar would be excellent. The scansion model as Kirby wrote it asks for fully macronized texts to begin with. All best. |
The solution I am currently trying out for my own research adds an enumerator to prevent the index function fetching the wrong syllable, so changing: line 266 to: def _long_by_position(self, sentence_index, syllable: str, sentence: list[str]) -> bool: 288 to: next_syll = sentence[sentence_index + 1] 324 to: for i, syllable in enumerate(sentence): These fairly minimal changes (with the change to the logic of lines 290–291) make the line ἀνδρῶν ἀρίστων, οἳ τὸ πάγχρυσον δέρας scan ['¯¯˘¯¯¯˘¯˘¯˘x'], and have removed repeated syllable errors in other texts I have tried. |
@kylepjohnson sure I'll sort that, I just need to get around to a little more testing in real text examples. |
* Update grc.py This is a solution to two bugs on the grc prosody function. The first changes the logic of the long by position so that the lack of either a mute OR a liquid allows for a long rather than the lack of them both. The second adds an enumerator to the scansion function so that locating the position of a syllable in a sentence is not reliant on the "index" function and therefore ought to handle reduplicated syllables better. * Update grc.py space error
Hi @sjhuskey my changes have been integrated. I would love to know what you think if you get a chance to test it! I am planning to look at the possibilities of a dictionary lookup based macronizer for those edge cases that just won't work any other way |
Thanks for your work @SDCLA! I'll check it out sometime this week. |
Fixed, reopen this issue if the @kylepjohnson's fix is not sufficient. |
The
Scansion()._make_syllables()
method does not syllabify words as expected.To Reproduce
Steps to reproduce the behavior:
Expected behavior
For example, this line:
Should be broken into these syllables:
But
Scansion()._make_syllables()
produces this:That has ramifications for the scansion. It should be this:
But
Scansion().scan_text()
on that line produces this:It looks like the syllabification process is not accounting well for double consonants.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: