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

Anceps crashes when scanning Seneca's Tragedies #1

Open
Ycreak opened this issue Feb 7, 2022 · 2 comments
Open

Anceps crashes when scanning Seneca's Tragedies #1

Ycreak opened this issue Feb 7, 2022 · 2 comments

Comments

@Ycreak
Copy link

Ycreak commented Feb 7, 2022

I am running Anceps to create a training set for neural networks. When running the program on Seneca's Medea, it crashes on line 662, patrioque pendet. It also seems to have trouble somewhere around Hercules Oetaeus' lines 276-279:

perfer manus quocumque quid cessas dea
utere furente quod iubes fieri nefas
reperi quid haeres ipsa iam cesses licet
haec ira satis est nvt pectoris sani parum

The error reads:

File "anceps/src/scan/word.py", line 103, in __get_prefix
    prefix = Word.PREFIX.match(option.scansion).group()
AttributeError: 'NoneType' object has no attribute 'group'

If fixed it in the Word class, by adding a try to the init function:

        if next_word:
            try:
                self.next_word_prefix = next_word.__get_prefix()
            except:
                self.next_word_prefix = None
        else:
            self.next_word_prefix = None

The scansion will fail, but that is fine for my use case. As long as the other lines are scanned 🗡️

I am not sure why Oetaeus goes wrong :S Anyway, great tool!

@Dargones
Copy link
Owner

Dargones commented Feb 7, 2022

Thank you for the interest in the tool, @Ycreak! If you need a good training set, you might be interested in this repository, which contains proof-read scansions of trimeters in all of Seneca and also four Neo-Latin plays, all produced with the help of anceps. I can also privately share the raw text files from which those scansions were produced (proof-read editions of Zwierlein and Grund) The accompanying paper is forthcoming in American Journal of Philology in 2022 (authored by myself, @diyclassics, Pramit Chaudhuri, and Joseph P. Dexter as part of the work done by the QCL).

Please be aware that anceps can only handle meters that are defined at the bottom of meter.py, so you might need to add Sapphic Stanzas there to scan that particular line of Medea. Doing so should be fairly easy (see documentation). Depending on your edition, there might also be a lacuna at this line, as in here. We do have scansions for the Hercules Oetaeus passage that you shared but perhaps there is a difference between editions. I adopted your solution for now and will see if I can pinpoint the problem further. How does the line reads in your edition of Medea?

It is exciting to see that neural networks are being applied to this task as well! Looking forward to learning more about it and good luck with your thesis!

@Ycreak
Copy link
Author

Ycreak commented Feb 8, 2022

Hi @Dargones, thank you for your quick reply and the linked repository! That is absolutely invaluable to my research!

Regarding Anceps, my approach has been a bit crude: I just gave the program all of Seneca's tragedies (LatinLibrary versions) with the -trimeter parameter to find all trimeters: scansions listed as failed I skipped in later processing. But it was interesting to see it processes lines like "et quas Taygeti iugis (77)" and " caeloque lucem++spectat hoc nostri sator (28)" fine (correctly showing 'failed' in the output JSON), but failing to scan "patrioque pendet (660a)". I would expect it to return 'failed' in the JSON, not crash the entire program :D

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

2 participants