This code was presented at the 2019 Electronic Literature Organization's conference in Cork, Ireland.
There are three Python modules in this repository, one for generating sonnets in French, one in English, and one in Spanish. There really should be one master module that can be parameterized for specific languages and corpora, but I leave that project for another day. All modules are very similar and differ only in the way they handle source data and scansion rules (alexandrines or pentameters, for instance).
You will need to install the following Python modules (the current repo works for Python 3.7):