NaPoWriMo 2022 Day 9, and NaPoGenMo 2022 No. 2

poetsbot

Two computer-generated sonnets, and links to the source code that created them. The code works by randomly mixing lines from existing poems.

  1. I downloaded a bunch of Elizabethan sonnet sequences from Project Gutenberg, then did some manual work to strip out most of the text besides the sonnets themselves.
  2. The scripts:
    1. verses.sql (https://caracabe.com/pb/paste.php?id=11) creates a database to store lines from the sonnets.
    2. feedlines.py (https://caracabe.com/pb/paste.php?id=10) is a Python script to scan through a file of poems, looking for lines that are complete sentences. I would have written the algorithm differently if I had chosen my source texts first, but I tried to err on the side of excluding too many lines rather than including too many. When the script finds a line meeting the criteria, it stores it in the database, along with its source.
    3. feedlines.ini (https://caracabe.com/pb/paste.php?id=12) is a configuration file for feedlines.py.
    4. nomlines.py (https://caracabe.com/pb/paste.php?id=9) is a script to choose random lines, along with source info, from the database.
    5. nomlines.ini (https://caracabe.com/pb/paste.php?id=13) is a configuration file for nomlines.py.

 

The sonnets and their sources:
 

And Should I

And should I leave thee then, thou pretty elf?
Damon, farewell.
I’ll teach thee, lovely Phillis, what love is.
You cannot love, my pretty heart, and why?
Doth fancy purchase praise, and virtue shame?
Yet serves not this! What next, what other shift?
If this her worst, how should her best inflame?
“Murder! O murder!” Is there none to aid me?
Memoria. As intellectual, it is memory.
Fly low, dear love, thy sun dost thou not see?
Amor. Then is she love, embracing charity.
To drown in sight of land is double spite.
Are women woe to men, traps for their falls?
Count it a loss to lose a faithful slave.

Sources:

  • Delia by Samuel Daniel

  • Diana by Henry Constable

  • Fidessa by Bartholomew Griffin

  • Idea by Michael Drayton

  • Phillis by Thomas Lodge

 

Most True That

Most true that dearest life shall end with love.
What should I say? what yet remains to do?
Check him but once and he will soon retire.
In such a breast what heart would not be thrall?
Most true that she contemns the god of love.
Bearing the wound, I needs must feel the pain.
May show of goodness lurk in treachery?
Honour is pride, and pride is nought but pain.
Dear to my soul, then leave me not forsaken!
Yes, yes, I dare, I can, I must, I will!
Ah rocks, where are your robes of moss?
Trees, rocks, and flocks, what, are you pensive for my loss?
And I,–oh would I might, or would she meant it!
Heavens are not kind to them that know them most.

Sources:

  • Delia by Samuel Daniel

  • Diana by Henry Constable

  • Fidessa by Bartholomew Griffin

  • Idea by Michael Drayton

  • Phillis by Thomas Lodge