Class: Reading and Writing Text
Professor: Allison Parish
Assignment this week asked us to create a notebook program that reads in two or more texts and stores portions of them in Python data structures. The program is expected to create textual output that creatively rearranges the contents of the text. Use functions from the random module as appropriate. We also must use lists as part of our procedure.
Inspiration
It was Oscars 2019 night, Sunday (Feb 24). As usual, the students were working hard on the ITP floor. A few of us who are fans of the annual Oscar event, made sure to have a production laptop broadcasting the live show while we worked. So I signed up for a free trial with You Tube TV. Five minutes later, the program came on, and we were all excited to see the once-a-year experience over a small laptop screen. As a movie fan, I try to watch, if not all, most of the Best Picture nominees prior to the Oscars night. This year, I did okay. I had seen probably about half of them. Among the ones that didn't get nominated, but was one of my favorite this year, was The Wife starring Glenn Close who received a Golden Globe - Best Actress in Drama for her role as the wife in the story.
I had a chance to watch the movie on my flight back to New York from Houston, after my grandmother's funeral in late January. I was exhausted, almost had to watch the movies twice to get the whole story. Anyways, it left me with so many thoughts of admiration for women with talents for writing. They were never recognized for what they contributed or had the same opportunities to develop their potential simple because they were female writers.
My mom also writes. I remember she used to teach me write, and thanks to her, my writing in Vietnamese turned out not bad. I even received very good grades for writing classes throughout my years in school. Anyways, this is already a long story. Basically, for the Python Reading and Writing Assignment this week, I wanted to give credits to the story that informed me about great female writers, and I wanted to introduce two of our great Vietnamese poets: Ba Huyen Thanh Quan and Ho Xuan Huong, whose work have always been highlighted in our middle school and high school Literature programs.
Approach
I found The Wife movie screenplay by Jane Anderson, based on the Novel “The Wife” by Meg Wolitzer. Next I picked one of the greatest poems by Ba Huyen Thanh Quan: On the Cross Pass, and one of the greatest of Ho Xuan Huong: The Floating Cake.
The plan is: I am going to split up all the words from these text files, store them in some kind of variables that contain lists of word elements. Then, I am going to pick out portions of elements from lists stored these variables to join them together, and see what happens.
Execution
1. Split up the excerpts into individual words
2. Thirty-five (35) words in The Floating Cake, and 68 words in On the Cross Pass, I added the numbers which gave me 103. So, I picked 103 random words from The Wife screenplay. Then I joined these words and store them in a list.
3. Then, I played with the joined list of words a little bit.
Add emojis
Replace words
Reflection
Python is quite powerful with manipulating text. Although the code lines are quite intuitive, it simply requires practice to efficiently and effective execute in a creative way, which I need to do more.
I feel great about my inspiration for my assignment for this week. However, I feel like I could be more creative with what I wanted to do. Somehow, the fact that it was someone else' text, especially they are such great female writers, I was held back a little bit in terms of manipulating their words. But after all, it is just for learning purpose, and I loved that I was able to explore the work of some great female writers.
Soon I want to play more with the text formatting, so save that for next time.
Comments