Screen Shot 2019-05-09 at 3.15.56 PMScreen Shot 2019-05-09 at 3.15.47 PM

‘Him’ By Yves Pokakunkanon

The source text for this piece was selected from text messages between members of a family with a member who got diagnosed with esophageal cancer. Each sentences were divided into 4 groups:

‘he does’ – the condition and behavior of the patient.

‘he feels’ – patient’s feelings and what family members think he feels.

‘he says’ – what the patient says to family members.

‘please do’ – what family members say to each other.

Here’s the final version of the code.

Screen Shot 2019-05-09 at 1.47.00 PMScreen Shot 2019-05-09 at 1.46.51 PM

The progress from the initial and the last version is quite drastic. I started off using Tracery to create a very simple poetic form which looks like this.

Screen Shot 2019-05-08 at 10.05.46 PM

Screen Shot 2019-05-08 at 11.35.30 AM.png

I asked several people to read and give feedbacks, most of them suggested that the repetition of the word ‘he’ somehow made them uncomfortable. I decided to get rid of the words ‘he’, ‘him’, and ‘his, from the source text and print out the result again.


I liked that it felt less forced this time without the word ‘he’, but I also think it lost the tension that it had before. I asked people to give feedback again and Winnie suggested me to try repeating each sentence more than one time to increase the tension. I created a function that will repetitively print out first 2 words of each sentence and add next 2 words each time until it prints out full sentence. (Sorry for the confusing explanation! It will be easier to understand if you see the example below!)

Screen Shot 2019-05-09 at 3.55.12 AM.png

I really loved the results this time. I also decided to add one more which consists of 3 adjectives. These adjectives are the synonyms of  a randomly selected word from the first paragraph of the piece.

Screen Shot 2019-05-09 at 1.46.51 PM

Screen Shot 2019-05-09 at 1.46.51 PM

Here’s the link to the code.

Please see the top of this post for the results!

RWET: Assignment 6


I had huge writer’s block and couldn’t come up with a good topic for this week assignment. I think one of the reasons is because i still don’t fully understand the concept of word vector and the way it works yet? I decided that for this week I’d try experimenting with new methods and focus on understanding each tools rather than the concept. I decided to go over week 9 and week 10 materials one more time. I followed the tutorials and used week 3 work and Lana Del Rey’s lyrics as source text this time.

I reworked my mashup lyrics from week 3 with synonym lookup. Now the program is rewriting lyrics that have the original words replaced by their synonyms (Which was I wanted to do before but I didn’t know how). I also brought in more lyrics from my favorite artist and used CMU rhyming dictionary to create new poems. For this one, I would have to revisit this piece again and make sure that it wouldn’t pick the same word as a rhyme because most of the results it gave me was two same phrases over and over.

Please see some of the results I like on the top of this post.

Screen Shot 2019-04-18 at 2.35.17 PMScreen Shot 2019-04-18 at 2.38.03 PMScreen Shot 2019-04-18 at 2.38.16 PMScreen Shot 2019-04-18 at 2.38.33 PM

Link to code

Machine Learning : Assignment 3

For this week’s assignment I use an image classifier that can predict the color of an object and then show a list of other objects that can potentially have the same color. I think this can be a fun educational tools for kids to learn about colors and vocabularies.

I trained the model with different shades of Orange, Blue and Green. The result wasn’t as accurate as I hoped it would be. I might have to add more images to make it work more properly.

RWET: Assignment 5

A letter from past me to future you

Screen Shot 2019-04-04 at 3.04.38 AMScreen Shot 2019-04-04 at 3.09.03 AMScreen Shot 2019-04-04 at 3.17.01 AMScreen Shot 2019-04-04 at 3.08.09 AMScreen Shot 2019-04-04 at 3.10.19 AMScreen Shot 2019-04-04 at 1.57.10 PMScreen Shot 2019-04-04 at 1.53.35 PMScreen Shot 2019-04-04 at 1.55.54 PMScreen Shot 2019-04-04 at 1.53.57 PMScreen Shot 2019-04-04 at 1.50.19 PM.png

by Yves Pokakunkanon

I found some old letters from my girlfriend while cleaning the apartment and I thought they would be a suitable source for this week assignment. I chose to use the first one and the last one just because of how contrasting they are to each other. The first letter was dated 01/2017 and the last one was dated 02/2018. She hasn’t sent me any more letter since then. I won’t go into details or post the letters here, but in summary, the first letter was just her telling me about her day and the second was her expressing what she felt about our relationship.

I decided to use Markov model and chose a very simple structure code that we covered in class a week before. My computer decided to die and refused to turn itself back on while I was working on the code and in the end, I did not have enough time to do something complicated. I will try to revisit this week assignment again when I have time.

Screen Shot 2019-04-04 at 3.16.08 AMScreen Shot 2019-04-04 at 3.20.32 AM

I first set state_size to 2 but after it kept giving me results with very little variations I decided to change state_size to 1 and it got way more interesting. Most of the results were more like scribbles than real sentences but once in a while some really funny results also showed up. I picked some of the ones I like the most and rearranged them into a new letter that you can see on the top of this post. I will write them down on paper and send it to my girlfriend later.

Link to code