Midterm Project (Sapphic stanza and fragmented text)
While considering some of the different methods for generating poetry and text in our readings I was reminded of the Ancient Greek poet Sappho (630 – 570 BC). One of the things that has always intrigued me about Sappho is how little of her writing remains. Of the nine books of her poetry only one complete poem exists, the Hymn to Aphrodite, the rest are only fragments. I always found the incompleteness of the poems to offer a kind of incredible power through their mystery and speculation as to what might have preceded or continued from them.
This made me consider them outside a the typical literary academia and how we might reconsider the definition of an algorithm for generating text. The reasons for Sappho’s poetry not surviving is varied though much of it is due to it simply falling out of fashion in Ancient Rome in schools. Though it would please many scholars to find the complete work of Sappho, its partial destruction could also be considered a very long culturally driven algorithm toward a unique and wonderful text wholly separate from its author’s intentions.
This is how I decided to write a basic program to generate poems in approximated Sapphic stanza generated from a corpus of combined writings, and then devise a means of partially destroying the generated text… with the intent of creating something unique in its apparent incompleteness.
The Code
The Sapphic stanza can be loosely approximated as 11, 11, 11, 5 syllables, though ancient Greek has more complex syllabic rules… so this was what I aimed for using a two part method for counting syllables:
d = cmudict.dict() # Syllable counter - If dictionary fails, vowel groups method guesses def count_syllables(word): if word in d: return sum([len(list(y for y in x if y[-1].isdigit())) for x in d[word.lower()]]) else: word = word.lower() if word.endswith('e'): word = word[:-1] vowels = 'aeiou' in_vowel_group = False syllable_count = 0 for letter in word: if letter in vowels: if not in_vowel_group: in_vowel_group = True syllable_count += 1 else: in_vowel_group = False return syllable_count
The rest of the code iterates over a frequency dictionary built from a text file and builds the stanzas line by line. While I had been trying to implement a Markov-chain method to generate the lines more dynamically I was unable to combine it with the syllable counter successfully. The current method uses word frequency (borrowed from Erik Mika’s Geo Haiku).
A few stanzas prior to destruction:
shook honey slender stand beauty mad man light
garlands over then them dika dawn out
flower care turn blossomed little their friend zeus
adonis flowers
as roses gifts age hesperus dance
sleep skin follow seemed whose tremors young seized far
shepherds sly heaven nectar did die troy
work regret
dance sleep skin follow seemed whose tremors young
seized shepherds far sly heaven nectar die
did troy work regret suppliants
go persuade stands
Destruction Methods
After generating a length of stanzas (of varying quality) I set out to find ways to partially destroy the text. I felt that the method should be non code based, or that the logic should be at least separate from the method for creating the text, but related to the texts medium, being digital.
My first attempt seen at top and in other forms, was to grow the body of poems to fill entire CD-R discs, essentially repeating them until the file size was just around 600MB. After burning the CD-R I employed various methods to damage the disks, including putting the discs into a microwave oven (the result seen at top alongside a partial papyrus of Sappho). After this I attempted to do a forced no errors RAW-read dump of the entire CD-R to an image file. I tried “readcd” a Linux utility as well as a Windows application for cloning Nintendo Wii games. With more time I think the Linux utility could work, but I was never able to successfully get an image file successfully dumped. The plan after this was to use this Python script that recovers text from corrupted files.
Eventually I resorted to an equally ridiculous method: (1) creating a blank 1bit black and white bitmap file in Photoshop. (2) opening the file in a Hex editor and pasting the generated poems directing into the bitmap as seen here:
(3) I then opened the bitmap in Photoshop and tried various methods of “messing” with the visual form of the text (this involved converting the bitmap to grayscale for editing and then back to bitmap before saving):
I tried manually smearing the text areas as well as applying different levels of visual noise (both gaussian and uniform) to the image files. (4) I then reopened the bitmap files in the Hex editor and extracted the text back to a text file. Surprisingly much of the formatting was retained at times. Here are some of my resulting texts:
With 50% uniform noise:
against id make inch lie
honeybee dElight owment fierce weav% thought
colour without hearts shadowed flesh√°reing yoking
shivering hades humanmelodious woun`ing excites ply world
parents rosy easy ghnstly$has
unseen lady
wings cooleb
Because
often fathers immortal burl
altars scatters pasture plosades step
ever}th)ng gained
With 25% Gaussian noise:
dÈnce s|eep sKÈn fÔllow seemed whose uremoRs young
soÀázed`qhepherds fa2 sly(heataf nectqr(die
dit tRoy wgrk rmwret ss
p,iants
oo pessu·dE spand3
snaras {appho gges!flowing†ever bgoˇ
full ddd festife nera water others
alone path hoplitew boy0crc
u miughtar
ne`ves leavinÁ stray
sweetfgss bittercweet broıght/ˇpoke woumt anrwered
prefer wrongs meiory
`orses holy recall
bsc
zes pour fewjs
With some manual finger painting:
daughter glittering c≠ple this its
came will if hair moon by no bringing
aphrodite op[house one girls shell
mind deathless clear child
are tender fn_gotten voice
things when back down there stars dying
once crethcminded graces filled ardent
lesbos win armed high
shook honey)ûlender stand beauty mad man light
garlands over then them dika)Ô¨Çawn outflower care turn “loÀöso√åed,ittle
4heir friend zeus
adeÀúis floƒ±rsmoÀùnt`in 7¬∑rrioÀôs 3h ll,ef|”l)cker
cytherea brin`¬™earth&z ‘Àô`o|3ee !o¬∏d7ƒ±!z/Àö‚Ć
o˝ /˙{ıouo %qual loveliest wvÌath%{ˇıu~iz%
/ˇ˚Ä&n!e~!n(ap>!/ˇ˜˝w†/ff mother gods ynØ
ar/ˇˇÙ:+†!{˝z%˛ p 0:¸(/Û†˙x
e / was up
us an
vas /ÀáÀá‚ĆÀùw~;‚Ć#ƒ±¬∏>?‚Ć√íuÀá 4|Àù√Ño√è,ow seemed whotr |2%ÀáÀá?√ÑÀáÀáÀú‚İÀù|?ƒ±t ¬∏<> √Ñ?√Ñ0Ô£ø/ec|ar did die {√ôo}?ÀáÀá‚Ć?ÀáÔ£ø?ÀáÀõ Àá√ѬØÀá¬Ø?√ô;op:es sappho goe[ “?Àá?ÀáÀáÀáÀáÔ£ø¬∏?Àá√Ñ0Àá¬∏Àá√Ѭ∏xÀõ(%zs alone pas√ñ (ÀõÀáÀá√ѬØÀá‚İÀáÔ£øÀáÀá√®Ô£ø√ÑÀá¬ØÀõ√Ñ8Àú‚Ć√Çetness bc¬´< ÀáÀáÀõ√ÑÀáÀáÀá√ÑÀáÀá¬øÀáÀáÀá‚İ?ÀáÀáÀáÀá¬∏Àõ?√ÑÀá?Àù1pƒ±mory
hor}‡1ˇˇ¿ˇ‡?˛¯ˇˇ¸ˇˇ‡ˇ tsip end&ÿ ?˛‡Á¿‡ˇˇ¯ˇˇˇˇˇ¿ˇ¿¸0%member,E?Ùˇˇ˛ˇˇˇˇˇˇ¯ˇˇˇ£ˇ˛„ˇˇ¸?p3uffer hø<ˇ


























