Reading & Writing E-text

RW E-Text - Dark Souls, Lonely Hearts - FINALS (update)



Development Diary

For my finals I will continue my previous exploration of computer generated poetry using database of words from the game Dark Souls

Dark Souls is the story of a lonely warrior braving a strange and dreamlike world filled with monsters. It is known for being a very difficult game, but also for its cryptic story line and intricate meticulously crafted level design. It emanates a constant sense of dread and wonder, as you roam through dark corridors and spiraling towers - dying over and over again as if in a curse, slowly progressing through trial and error. While playing as its silent protagonist for many hours I realized that I was constantly filling this silence with strange recurring inner monologues. Most of it was relative to the repeating game mechanics - "dodge; jump; perry; dring; flee", but not only that. As if in a shallow trance, I was combining small snippets of dialogues and thoughts related to the emotions and exchanges in the game. I would think on the empty windows, the constant dread, the ever repeating loop of dying, fighting and dying again, roaming foggy lands and listened to non-existent dialogue from its monsters. Often taunting, but mostly suffering and longing. 

When learning how to use Python and Tracery to create randomly generated text, I used the Dark Souls repository of words just because It seemed like the most interesting one and I imagined that it would be funny just to play with it. But as I started to add elements of the game world into love stories I was reminded of the voices in my head when I played videogames - specially ambiguous ones like Dark Souls. That strange combination of words, phrases and game elements in my Tracery exercise felt a lot like the same process that went through my head - and how powerful it is when the player transforms the game experience into something of his own. And what is poetry function if not to blur the literary narrative with the reader's most inner thoughts?

Only when a loyalty has his or her left arm accidentally kissed by a demon, will a sellsword truly believe in love.
Only when a wings has his or her thumb sheepishly touched by a critical foe, will a princess truly believe in love.
Only when an ash has his or her core violently caressed by a friend, will a beast truly believe in love.
Only when a hint has his or her core jubilantly touched by a friend, will a fatty truly believe in love.

Expanding the original idea

Updating the original code - saving expansions

Lists and basic rules are working properly. Also, added some new lists. Now I need to create more rules in order to generate an overal arch for the final piece. This means creatin a sense of beggining and end to the poem. For this I want to start by saving the objects generated so it can remain part of the generated narrative.

Kate Compton's Hero example 1 and Her Crystal Palace Tracery Tutorial

rules = {
    "story": ["One evening in #location#, a #mood# #lover# met #wise.a# who asked: Do you believe that #muse.a# can love #lover.a#? The #wise# looked at the #lover# with #mood.a# #bodyPart# and touched the #lover#'s #bodyPart# while saying:Only when #creature.a# has his or her #bodyPart# #adverb# #verb# by #creature.a#, will #muse.a# truly believe in love."],
    "noun": [ "#creature#", "#bodyPart#", "#concept#", "#object#"],
"verb": verbs,
"location" : locations,
"object": objects,
"creature": creatures,
"bodyPart": bodyParts,
"action": actions,
"concept": concepts,
"conjunction": conjunctions,
"adverb": adverbs,
"mood" : moods

grammar = tracery.Grammar(rules)
for i in range(2): 

The result: 

One evening in Church of Yorshka, a offended queen met a sage who asked: Do you believe that a poor soul can love a queen? The sage looked at the queen with an elated stomach and touched the queen's smallfinger while saying:Only when a dragon has his or her left side yieldingly hugged by a wretch, will a poor soul truly believe in love.
One evening in Cathedral of the Deep, a earnest oddball met a pyromancer who asked: Do you believe that an oddball can love an oddball? The pyromancer looked at the oddball with a chipper tail and touched the oddball's rear while saying:Only when a pilgrim has his or her right side weakly touched by a cleric, will an oddball truly believe in love.

Prose and poetry - making it more complex

Now that I can save the results could keep on adding more and more elements to the #story, but I'd like to try doing something more than a Tracery generated fan fiction. How could I make prose more like poetry? I'd like to add more flow and rhythm to it. The narrative could start like prose, but evolve to a more recursive structure as the "lover" and "wise" character dwell deeper into what loves means in the strange world of Dark Souls. For this i'll have to go beyond the safe waters of Tracery.

Rhyming with word vectors

After looking at most of the class notes and Allison's Parrish's repository, I believe that only  word vectors will be able to give me what I want.

Spacy, word vectors and tracery 

After studying the Word Vectors and spaCy notes by Allison Parrish, I managed to mix it to my previous Tracery Dark Souls code with some very satisfying results. 

Word Vector is as system for finding similarities between data in several dimensions. In principle it works like any vector: X and Y positions in a 2D plane. In the first example, it compares different animals organized in a X and Y axis of cuteness and size. By analyzing the distance between them it is possible to get some interesting insights about the relationship of kittens and tarantulas for example. 

Spacy is, among another things, a Natural Language Processing system that can be used to parse through huge amounts of data and extract all kinds of information from it. It is specially useful for text analysis. 

In my case I managed to use Word Vectors and Tracery to go beyond the initial Json Dark Souls library I've been using inside my Tracery prose. 

After creating all the different arithmetic functions for vector comparison, addition, subtraction, mean, I installed spaCy and fed it with the "Frankenstein" text from the example notebook. 

With these codes in place I just applied them inside the Tracery rule set.  

A normal Tracery rule set is like this: 

rules = {
"story": ["#tracery_halfsies#.......One evening in #location#, a #mood# #lover# met #wise.a# who asked: Do you believe that #muse.a# can love #lover.a#?\nThe #wise# looked at the #lover# with #mood.a# #bodyPart# and touched the #lover#'s #bodyPart#  ( EDITED).............."],   
    "noun": [ "#creature#", "#bodyPart#", "#concept#", "#object#"],
"verb": verbs,
"location" : locations,
"object": objects,
"creature": creatures,

A spaCy powered Word Vector operation for finding words located halfway between two other words. looked like this:

spacy_closest(tokens, meanv([vec("truth"), vec("war")]))


Ominous right? And cool! 

So I add this spaCy code as one of the rules, but instead of comparing two specific word it is comparing words generated by tracery for that specific iteration of the rule set. If it chooses the word "Angel" and "Miscreant", the spaCy rule will compare these two and give me a new word not included in the original Dark Souls Json file. 

Here it is comparing #lover# and #muse#, (which were generated from the #creature# library and saved to be used through the whole text.)

"tracery_halfsies": spacy_closest(tokens, meanv([vec("#lover#"), vec("#muse#")]))

Now I just have to add #tracery_halfsies# inside the bigger story generating rule set - in my case "story:"

rules = {
"story": ["#tracery_halfsies#.......One evening in #location#, a #mood# #lover# met #wise.a# who asked: Do you believe that #muse.a# can love #lover.a#?\nThe #wise# looked at the #lover# with #mood.a# #bodyPart# and touched the #lover#'s #bodyPart# while saying:\nOnly when #creature.a# has his or her #bodyPart# #( EDITED )..............f #techniques# was of no use to defeat this #creature# that grows inside."],   
    "noun": [ "#creature#", "#bodyPart#", "#concept#", "#object#"],

Polishing the Tracery/WordVector integration and beyond.

Now that I've got the integration working and added the word vector code to my original Dark Souls Final notebook, it is time to be more creative with it.  I want to do more than adding new words, and since word vectors are already in place, I'll try going back to the Word Vector notebook and add some systems for sentence comparison. I might even mix what I've got with a Pablo Neruda poem on love lost "I do not love you except because I love you". Sorry Neruda!

Managed to add the sentence comparison system to the Tracery code. The next step is to make it compare with more texts. I haven't touched the Neruda poem yet though. But now...

Using Pronunciations and Annoy

Installed Pronounce, Annoy and WordFilter. The goal is to get the final part of the Tracery code and gradually make it decompose like the example shown on Allisons page on "some applications". If possible, I will make it so the words will rhyme as they decompose with the results from the tracery rules.

More specifically, I want to stretch the iconic Dark Souls sentence "You Died" to as far as possible, making the tracery prose fade away in a string of repeating words.

Meanwhile, this is the latest result I'm getting from the code

"Precipice.......One evening in Road of Sacrifices , a fatigued tough enemy met a moneybags who asked: Do you believe that a monster can love a tough enemy? The moneybags looked at the tough enemy with a refreshed smallfinger and touched the tough enemy's ringfinger while saying:\n
Only when a sellsword has his or her mount innocently touched by a skeleton, will a monster truly believe in love.
The tough enemy looked the reflection in a mirror and murmured and saw a precipice and a perceptions and a perceptions...\n
Not a single monster, in his/her mind only images of warned inhabit and frogs and hare.\n tough enemy roamed until arriving at a dark spot in Irithyll Dungeon.
His/her mastery of prudence was of no use to defeat this duo that grows inside.precipice is what makes tough enemy parrying through Archdragon Peak and moonshine
As tough enemy dreams of monster - a sound like ore, a sound like lion echoes. Then nothing else as tough enemy is killed once more by a viciously beating to a pulp from the relentless undying player.You Died....tough enemy",

RW - Assignment #4 - Dark Souls Dating Sim

Link to my Anaconda Notebook with this project here

Assignment #4
Devise a new poetic form and write a computer program that generates texts that conform to the poetic form you devised. Your poetic form could be something as simple as “Each line must begin with the letter ‘A’” or something as sophisticated as Mac Low’s diastics. Your documentation for this project should include the name of your poetic form, and a thorough description of how it works, along with a number of “poems” that your program generated (at least three).
Consider the following when evaluating your work:
  • How well does the output of your computer program conform to your invented poetic form? Could a human do it better?
  • How does your choice of source text (your “raw material”) affect the character and quality of the poems that your program generates?

Learning creating a Dark souls dating sim

Tracery is a tool that generates a series of rules that tell the computer how to put text together, like a Grammar. 

I have to admit that I was almost giving up on this class. Don't get me wrong! The teacher is great and the subject is very interesting, but I felt I was lagging behind and couldn't keep up. But then, I decided to sprinkle some bizarro nerd humor on top of the exercises and I ended up with my "Dark Souls" dating talk, which generated gems like these: 

If only I had a trap in my house! But there is always some trio messing with me.
That guy only dates moneybagses that are into messages!
If only I had a trap in my house! But there is always some bandit messing with me.
That guy only dates fatties that are into bonfires!
That guy only dates youthes that are into eyes!
If only I had an eye in my house! But there is always some charmer messing with me.
That guy only dates liars that are into filthes!
If only I had a lever in my house! But there is always some assassin messing with me.
If only I had an umbral ash in my house! But there is always some spouse messing with me.
If only I had a bloodstain in my house! But there is always some you bastard messing with me.

For this is used the Corpora repository of Dark Souls III messages (here).

This inspired me to create what could be the dialogue of a Dark Souls dating sim!

Do you believe that a pyromancer can love a knight? Before a ghost jumping a demise with a throne?
Only when a longfinger has his or her leg unexpectedly rubbed by a Hollow, will a pilgrim trully believe in love.
Only when a silence has his or her core well rubbed by a Hollow, will an elder trully believe in love.
Only when a left leg has his or her pincer vaguely kissed by a Lord of Cinder, will a you bastard trully believe in love.
Only when a finger has his or her left leg queerly touched by a sorcerer, will a deprived trully believe in love.
Only when a wings has his or her core especially caressed by a skeleton, will a crab trully believe in love.
Do you believe that a trio can love a giant? Even though a Phantom plunging attack a you with a rite?
Only when a bonfire has his or her left arm bravely hugged by a giant, will a sorcerer trully believe in love.
Do you believe that a demon can love a critical foe? Despite an artisan shield breaking a silence with a torch?
Do you believe that a king can love a fatty? Although a cleric locking-on a coal with a soup?

Link to my Anaconda Notebook with this project here


My very emotional reaction to bringing love to the world of Dark Souls

My very emotional reaction to bringing love to the world of Dark Souls

A lot of room for improvement. Also, this begs to become a webcomic.

Some of my favorite sentences generated: 

"Only when a quite something has his or her head mortally caressed by a god, will you truly believe in love."
"Do you think that love between a spouse and a beast is possible?"
"If only I had more coffin in my house! But there is always some assassins messing with me."





Transcription Exercise - My 2014 ITS lecture on Virtual Reality


The goal for this first assignment of the Reading and Writing Electronic Text, was to transcribe something, anything that wasn't already available as electronic text.I have chosen to transcribe the following youtube video from a lecture I gave in 2014, together with Franey Nogueira, about this (not so) new thing called Virtual Reality

about the Video

The lecture took place at the Institute for Technology and Society of Rio de Janeiro, where every week experts in different fields would talk about the latest and most pressing issues. That year, the Oculus Rift headset was just released for developers and researcher, and I took it to myself to spread the word on this new media, while also pointing to the challenges and shortcomings of it. Meanwhile, the visual artist Franey Nogueira got interested in exploring the role of VR in her work and contemporary art. Franey and I were very excited to be invited there, and, after carefully watching the recording for this assignment, I realized that maybe I was too excited.

Thoughts on the transcription process

First, the transcription is in Portuguese, since it is the language of the original video. It took me about an hour to type 1701 words or less than 12 minutes out of the whole 1 hour and 33 minutes video.

During the transcription, I became awfully aware of my shortcomings as a speaker back then: I skipped words, mumbled and was often unable to finish structured sentences. I remember the final reactions and commentaries from the public to be quite positive, but looking and listening to all of my sentences, over and over again, while also typing then, was like holding a microscope into my own words.

Interesting enough, I realized that I was inadvertently correcting myself; fixing errors. If I mumbled something or finished a sentence abruptly, I would just not transcribe it or make small corrections. As I kept writing - and becoming more conscious of my speech - I would actually become more precise. The second half of the transcription has more "..." and mumblings than the first half.

When Franey, my colleague, spoke, I felt more at ease to be more precise with the transcription and I believe I've made barely any unconscious changes or improvements. This seemed to make it even more clear to me on how I was editing the transcription without even realizing it.

Plain Text format politics

After finishing and uploading the transcription to this website (here), I realized that the plain text format, when opened in my Chrome Browser, transformed basic Portuguese punctuations (like "ão" in "não"/"no") into a barely readable garble. The teacher, Allison Parrish, warned about using "weird signs" when using plain text, but I didn't realize that it would include some of the most important signs in my native Portuguese Language. I clearly understand the technical and historical reasons for the code not recognizing "ão", but seeing my transcription transformed into such a mess made me wonder about the political aspects of not having your own language recognized as "plain text". What does it mean when your language is not..."plain"?

Syllabus and first-week assignment: