Reading & Writing Electronic Text
Final: Markov Comic Book Series

April 27 2017

For my final Reading and Writing Electronic Text project, I created a series of computer-generated, short story, comic books.

Final Proposal: Generated Comic Book

April 13 2017

For my final Reading and Writing Electronic Text project, I am going to create a computer-generated, short story, comic book.

Hokey Pokey, Generated Poem

You put your dirty butt in
You put your right butt out
You put your clean butt in
And you flap it all about
You do the skimpy macorina and you turn yourself off, thank God
That's what it's designed to do, according to the Church.

Hokey Pokey v2, Generated Poem

You put your dirty boob in
You put your clean cheek out
You put your right boob in
And you jiggle it all about
You do the sexy fat lady and you turn yourself on...strangely
That's what it's problem is, according to research.

Python Code

import sys import tracery from tracery.modifiers import base_english rules = { #'origin': '#hello.capitalize#, #location#!', 'bodyPart': ['cheek', 'boob', 'butt', 'cleavage'], 'shake':['twerk', 'flash', 'swing', 'jiggle', 'flap', 'swang'], 'orientation': ['right', 'left', 'dirty', 'clean', 'slow'], 'dance': ['skimpy macorina', 'sexy fat lady', 'butt jiggle', 'slap yo mama'], 'position':['down, just like everyone else already has', 'in, at last', 'on...strangely', 'off, thank God'], 'called':['actually performed like by those who have had traumatic life experiences, unfortunately', 'designed to do, according to the Church', 'problem is, according to research', 'good for, if done exactly as listed'] } grammar = tracery.Grammar(rules) grammar.add_modifiers(base_english) #print grammar.flatten("#origin#") # prints, e.g., "Hello, world!" print 'You put your '+grammar.flatten("#orientation#")+' '+grammar.flatten("#bodyPart#")+' in\nYou put your '+grammar.flatten("#orientation#")+' '+grammar.flatten("#bodyPart#")+' out\nYou put your '+grammar.flatten("#orientation#")+' '+grammar.flatten("#bodyPart#")+' in\nAnd you '+grammar.flatten("#shake#")+' it all about\nYou do the '+grammar.flatten("#dance#")+' and you turn yourself '+grammar.flatten("#position#")+'\nThat`s what it`s '+grammar.flatten("#called#")+'.'
Hokey Pokey (python generated poems)

April 5 2017

This week I used Tracery, a computer language for random text generation originally developed by Kate Compton, in python to rewrite the Hokey Pokey for those interested in learning.

Family Songs, The Sound of Music, Generated Poem

the breasts fill my heart with the sound of an artistic form of auditory communication incorporating instrumental or vocal tones in a structured and continuous manner
with songs they have sung for a thousand years
and I'll rub once more
i know I will hear what I've heard before


my heart wants to beat like the wings of the birds
to laugh like a brook when it trips and falls over
from a church on a breeze
that rise from the lake to the trees

my heart wants to sigh like a chime that flies
my heart will be blessed with the sound of an artistic form of auditory communication incorporating instrumental or vocal tones in a structured and continuous manner
i go to the breasts when my heart is lonely
the breasts are alive with the sound of an artistic form of auditory communication incorporating instrumental or vocal tones in a structured and continuous manner

to rub through the night like a lark who is learning to pray
stones on its way
my heart wants to rub every song it hears

Family Songs, Jolly Holiday (Mary Poppins), Generated Poem

when Mary 'olds your 'and you feel so grand
your 'eart starts beatin' like a big brass band
it's a jolly nooky with Mary
mary makes the sun shine emitting or reflecting light readily or in large amounts!
mary makes your 'eart so light!
the daffodils are smilin' at the dove
when the day is gray and ordinary
oh, it's a jolly nooky with Mary
no wonder that it's Mary that we lust!
oh, 'appiness is bloomin' all around 'er

Family Songs, Let's Get Together (The Parent Trap), Generated Poem

let's get wasted everyday
and though we haven't got a lot
let's get wasted, not only so, but not only so, but not only so, but
why don't we ma-a-ake a scene
together, oh oh oh oh
think of all that we could sha-are
oh, I really think you're swell
why don't you and I combi-ine
let's get wasted, not only so, but not only so, but not only so, but
nothing could…
oo-wee, and if you stick with me
we'd be a cra-a-azy team
every way and everywhere
together
we can have a swingin' ti-ime
we could be sharin' all we've got
uh-huh, we really ring the bell
let's get wasted, what do you say

Python Code

import sys import random from PyDictionary import PyDictionary dictionary = PyDictionary() all_lines = [] # define a list # Delcare words to grab definitions yeah = " " bright = " " music = " " def definition_Of_Word(word_to_define, new_word): new_word = (dictionary.meaning(word_to_define)) for key in new_word: new_word = new_word[key] return new_word[0] # Replace with their definitions yeah = definition_Of_Word("yeah", yeah) bright = definition_Of_Word("bright", bright) music = definition_Of_Word("music", music) def allLower(anyName): # take each line and capitalize the first letter return anyName[0].lower()+anyName[1:] def dictionarySwap(anyName): # Replace key words in the text words = {'together':'wasted', "'oliday":'nooky', 'sing':'rub', 'hills':'breasts', 'love':'lust', 'yeah': yeah, 'bright': bright, 'music': music} # define a dictionary in a function for key in words: anyName = anyName.replace(key, words[key]) # replacing text using a dictionary return anyName def splitJoin(anyName, anyNameTwo): anyNameTwo = anyName.split(" ") # splits each string into words anyNameTwo =" ".join(anyNameTwo) # joins the words with a space return anyNameTwo #importing a separate text file for line in sys.stdin: line = line.strip() line = dictionarySwap(line) # replacing text by using a dictionary function all_lines.append(line) # add each line to a new array spot random.shuffle(all_lines) # shuffle the lines in the array randomly for line in all_lines: all_lines = splitJoin(line, all_lines) if len(all_lines) > 0: print allLower(all_lines) else: print all_lines
Family Songs (python generated poems)

March 29 2017

Using functions, and the PyDictionary library in python, I have rewritten a few classic family songs that everyone enjoys.

Regards, Generated Poem 1

Enter a verb: creep
Beloved,
Remember that you shall love before you weep
Please don't creep the group.
Regards, your boss

Regards, Generated Poem 2

Enter a verb: broadcast
Beloved,
Please don't typecast
Please don't broadcast us.
Regards, your professor

Regards, Generated Poem 3

Enter a verb: enlighten
Beloved,
Please don't whiten
It is time for you to enlighten me.
Regards, your stalker

Python Code

import sys import random import pronouncing as pr term = str(raw_input('Enter a verb: ')) all_lines = pr.rhymes(term) #define a list greeting = ["Please don't ", "Don't forget to ", "Everyone wants you to admire and not ", "It is time for you to ", "Remember that you shall love before you " ] ending = [" yourself.", " us.", " me.", " her.", " him.", " the group."] persons = ["your boss", "your professor", "mom", "your lover", "dad", "your cat", "your stalker", "your ex"] for line in all_lines: line = line.strip() all_lines = line.split(" ") all_lines =" ".join(all_lines) print "Beloved," print random.choice(greeting)+all_lines print random.choice(greeting)+term+random.choice(ending) print "Regards, "+random.choice(persons)
Regards (python generated poems)

March 18 2017

Generated by python are three poems of a new poetic form, consisting of four lines (one stanza), one rhyming word, and an opening and closing like that of a letter. The form that I have created I call a poetic email. After entering a verb of your choice, a random email is generated by python. The rhyme is generated by the pronouncing library.

Increasingly Nude World, Final

Goode, W: Senator's Nude...
In an increasingly nude world,
A northwest Louisiana tourism director h
In an increasingly nude world,
"The Nude Bomb" is not a very good comed
Watching -- and thoroughly enjoying -- N
A northwest Louisiana tourism director h
In an increasingly nude world,
fined 50 francs...

Python Code

import urllib import json import sys import random #term = 'cheeseburger' term = 'nude' length = 40 page = 1 api_key = "71c0c905beaa41adb505c6ee435ebc0f" base_url = "https://api.nytimes.com/svc/search/v2/articlesearch.json?" query_str = urllib.urlencode({'q': term,'page': page, 'api-key': api_key}) request_url = base_url + query_str response_str = urllib.urlopen(request_url).read() #print(response_str[:800]) response_dict = json.loads(response_str) #print response_dict.keys() # just to quickly check if the data looks correct articles = response_dict['response']['docs'] newlist = [article['snippet'][0:length] for article in articles] for item in newlist: random.shuffle(newlist) for string in newlist: string = str(string) string = str.replace(string, "multicultural", "nude") print string
Increasingly Nude World (python generated poem)

March 8 2017

Using text from a JSON file, pulled from the web using The New York Times API, I have generated a python program that attempts to examine this increasingly nude world that we live in.

Dr. Seuss Foreplay, Final

shine. not did sun the
said, wish 'how i and i
day. that all wet told, told,

shit!
foreplay. was it to too wet
all was could to we do so
shit!
and we not it. did like
go out to too wet
we had something do!' to
ball. foreplay told to and too

did we nothing all. at
spat house so the in we
two. spat we there, we
shit!
shit!
we in the house. so spat
bit. little not one
spat there i with silly.

Dr. Seuss Foreplay, Places You'll Go

done! There fun is to be
can ball the magical things do with you And that
be be, famous famous as You’ll can
winner the will all. winning-est make you of

foreplay games too. you’ll lonely
win can’t you Games
that sometimes afraid I’m
be points to are There scored.

Fame!
they Except don’t. when
world you wide on whole win TV. with watching the
games are won. to There be
won’t. Because, they sometimes,
Oh, the you’ll go! places
against you’ll you. ‘cause foreplay

Python Code

import sys import random all_lines = [] # define a list words = {'sally':'silly', 'play':'foreplay', 'cold':'told', 'sit':'shit','sat':'spat'} # define a dictionary for line in sys.stdin: line = line.strip() #line =' '.join(str(words.get(word, word)) for word in words) for key in words: line = line.replace(key, words[key]) # replacing text using a dictionary all_lines.append(line) # add each line to a new array spot all_lines.sort() # sorts them alphabetically random.shuffle(all_lines) # shuffle the lines in the array randomly #print len(all_lines) # print the number of items in the array # 22 lines of text for line in all_lines: all_lines = line.split(" ") # splits each string into words random.shuffle(all_lines) # shuffles the words all_lines =" ".join(all_lines) # joins the words with a space print all_lines
Dr. Seuss Foreplay (python generated poem)

February 27 2017

This week we worked with dictionaries in Python. I used a dictionary to replace key words with their values. The text output that I enjoyed the most was from the Dr. Suess children's book, The Cat in the Hat. Shown is the outcome of how python generated the text.

the sun did not shine.
it was too wet to play.
so we sat in the house
all that cold, cold, wet day.

i sat there with sally.
we sat there, we two.
and i said, 'how i wish
we had something to do!'

too wet to go out
and too cold to play ball.
so we sat in the house.
we did nothing at all.

so all we could do was to
sit!
sit!
sit!
sit!
and we did not like it.
not one little bit.

And By The Way Not Interested, Final

lame week of work.
steven you would like to thank me so much again for our super fun date on sunday.
yout had an absolute blast hanging out with me,
especially just talking with me in the car,
and by the way, you appreciated that you could be blunt with me,
because our fucking faith is one of the things we have in common.
bitch. unfortunately,
you must let me know that you know that you overestimated the amount of time you would have to commit to dating during sex.
as just one example,
you know we were planning to hang out during the upcoming weekend,
but you found out today that my co-resident needs me to cross-dress for her both days of the hospital.
:( you do not believe that the time you have available to talk or hang out is reasonable or fair to anyone.
you apologize for any disappointment this message may cause,
but you have no doubt that me will find a wonderful fucking girl who can commit wholeheartedly to a dating relationship, which is what me deserve.
you hope me understand by the way,,
and by the way, also know that you know me're an awesome guy,
so this decision is based on a professional,
not personal level.
you did everything 'meh' right on our wonderful date,
and by the way, you truly enjoyed spending the day together.
from the brief time you have known me,
it is evident that me is an incredibly faith-filled,
intelligent,
thoughtful,
and by the way, genuine party fucking animal,
and by the way, you owe me the absolute best in this new year as my brother in christ.

Python Code

import sys for line in sys.stdin: line = line.strip() if "h" in line: line = str.replace(line, "Catholic", "fucking") line = str.replace(line, "you", "me") line = str.replace(line, "I", "you") line = str.replace(line, "are", "is") line = str.replace(line, "gentleman", "animal") line = str.replace(line, "Aggie", "party") line = str.replace(line, "100%", "'meh'") line = str.replace(line, ".", ".\n") line = str.replace(line, "!", ".\n") line = str.replace(line, ",", ",\n") line = str.replace(line, "and", "and by the way,") line = str.replace(line, "think", "know") line = str.replace(line, "myself", "blunt") line = str.replace(line, "cover", "dress") line = str.replace(line, "wish", "owe") line = str.replace(line, "Residency", "sex") line = str.replace(line, ":)", "Bitch.") line = str.replace(line, "was", "had") line = str.replace(line, "good", "lame") line = str.replace(line, " at", " of") line = str.lower(line[10:]) print line[10:]
And By The Way Not Interested (python generated poem)

February 8 2017

One year ago, I went on a date with a beautiful and sweet girl that I had met online. I thought the date went well, but she did not. In fact, she thought that the date did not go very well at all, so much that she felt inclined to email me to let me know that she would never like to see me again. Honestly, the email was a nice gesture. I have used Python to regenerate the email that she wrote me. My goal for this piece was to give her an alternate personality. This poem is explicit.

Hi Steven,

Hope you are having a good week at work! Steven I would like to thank you so much again for our super fun date on Sunday. It was an absolute blast hanging out with you, especially just talking with you in the car, and I appreciated that I could be myself with you, because our Catholic faith is one of the things we have in common. :) Unfortunately, I must let you know that I think that I overestimated the amount of time I would have to commit to dating during Residency. As just one example, I know we were planning to hang out during the upcoming weekend, but I found out today that my co-resident needs me to cross-cover for her both days at the hospital. :( I do not believe that the time I have available to talk or hang out is reasonable or fair to anyone. I apologize for any disappointment this message may cause, but I have no doubt that you will find a wonderful Catholic girl who can commit wholeheartedly to a dating relationship, which is what you deserve. I hope you understand, and also know that I think you're an awesome guy, so this decision is based on a professional, not personal level. You did everything 100% right on our wonderful date, and I truly enjoyed spending the day together. From the brief time I have known you, it is evident that you are an incredibly faith-filled, intelligent, thoughtful, and genuine Aggie Catholic gentleman, and I wish you the absolute best in this New Year as my brother in Christ. :)

Sincerely,

Megan

The Balance of Reality, Final, v.6


Dear Steven,
has been denied.

Thanks again,
to New Balance. We are stony.

The Balance of Reality, v.3



Dear Steven,
Thank you very much for
Thanks again.
has been denied.
orry to inform you that
to New Balance. We are s
your recent application
your recent application

The Balance of Reality (a unix generated poem)

January 31 2017

After recently being rejected for a summer internship position, I used the UNIX command line tools to create a computer-generated poem. I manipulated the original rejection email using several different UNIX commands. Shown is my sixth version, and final resulting poem. I regenerated this piece until I felt that it captured the essence of how short, and cold I felt my rejection was. Version titles appear above each poem.

Dear Steven,

Thank you very much for your recent application to New Balance. We are sorry to inform you that your recent application has been denied.

Thanks again.

Commands Used:

Cat, Cut -d "s" -f 9, Fold -w 24, Sort, Sort -f, Tail -2, Head -2, Grep "denied", Grep "Thanks", Vi

New Commands Used:

Fold, Vi, Curl -s

Designed and developed by Steven Simon 2016.