Kintsugi is the Japanese artform of repairing of broken pottery with decorative metal, such as gold, transforming it into something more beautiful, something with a visible history. It’s a metaphor for resilience I’m reminded of by my own kintsugi bowl, sitting on my dresser.
I packed away a kintsugi kit for my best friend the other day and the inspiration struck me: what if I could make something beautiful out of broken code?
This led me to the thought of using Python to break apart words and put them back together to make something new. Like the compound word algorithm, the reader might assign definitions to the restructured nonsense words.
The method would be to isolate words in an existing text, separate them in one place after a consonant, shuffle all the “halved” words, and then pair them up to create slightly surreal new ones. These would be placed back in their original spot in the text. I’d want to maintain some normal words to balance out the nonsense.
Of course, what I set out to do often differs from what I’m able to figure out, and I made some adjustments. First off, because we haven’t gotten to identifying nouns yet, I isolated 5 letter words. I’d eventually like to update this code to parse out the nouns because I like the thought of making new, surrealist things.
# isolate words with 5 letters in a text
# split them after a the 2nd consonant into two lists
# shuffle the lists
# concatenate the lists into new, surreal, nouns
# use Tracery to replace original nouns in the text with surreal nouns
# OR a for loop to produce about 10 lines
Here are a few outputs with the new words:
I’m not sure what’s going on with these repeating lines, but I couldn’t locate where in my code this is happening: