Rhea Nayyar’s Final Project: “A Girl Dismissed”, the angsty goth twitterbot

My good friend Kate was the inspiration for my twitter bot. No, she’s not a goth queen, but she did a hilarious text generation program that used a computer manual and a Shakespeare play to make computerized sonnets.

https://twitter.com/666sadshawty666 <—- This is the account!!!! It tweets every half hour as long as I keep the program running.

http://imgur.com/gallery/PJLdR <—- These are some of the funniest returns I got from the program. I highly recommend looking through this if you have time but the twitter feed itself should give you a good idea of what the bot has to say.

http://pastebin.com/EufB7Vcz <—- this is a pastebin link that contains
the input text (emobot_words.txt) employed by my program. I collected
these texts from various places:

  •  Twitter itself: I scoured through several tags like “#gothlife”, “#gothproblems”, “#gothculture” and so on and found some amazing content to include in my file.
  • Tumblr: Looking through similar tags on tumblr yielded the same spectacular results.
  • Facebook Groups: Lots of angst-ridden people particularly enjoy airing their grievances on social media it seems.
  • Several Goth Blogs: gothicsubculture.com, www.thebelfry.rip, whatisgoth.com, and many other sites had loads of information about
    the gothic subculture, the stereotypes, history, and the backlash from mainstream society. They were actually pretty educational but all boiled down to the same message. Goths are drawn to darkness and macabre, but are generally happy people.
  • Song Lyrics: All from the popular early 2000s band called Evanescence. Tracks include “My Immortal” and “Wake Me Up”.
  • My Own “Creativity”: It’d be inappropriate, in my opinion at least, to use so many other sources for text generation so I absolutely had to include some of my own angsty poetry and thoughts from years past. I only hope it adds to the authenticity of this bot.

***I appreciate being able to locate and use all this content and this work isn’t intended to be offensive but to merely poke fun at the multi-faceted subculture. I was interested in gothic culture throughout middle school and high school and I’d like to consider this as an homage to my former self.***

There was an issue with creating the Twitter bot with .js file, so I had to switch to Processing entirely. There were some differences in syntax, but
it was relatively easy to adjust the code properly. I had learned some new
functions, too. And what a boolean is. That was very cool. Boolean is good.

ANYWAYS, down to the important stuff: RiTa library. The RiTa library contains about 40K words that are classified and grouped appropriately.
Self-described as a “software-toolkit for computational literature”, RiTa library is very simple to use but has incredibly intricate and complex results. I don’t want to go on forever about it, so I’ll link you to the RiTa
homepage: https://rednoise.org/rita/index.php

To create the text generator, I had to use the Markov chain function. The Markov chain is frequently used in natural text generation through programming. Essentially, the Markov chain takes input text and analyzes the words and which other words follow them and so on. Through this analysis, the Markov chain function allows the program to randomly generate grammatically correct sentences from the input text (in this case, the emobot_words.txt file). This is achieved by calling a function known as markov.generateSentences(); .

captura-de-pantalla-2016-12-09-a-las-5-36-48-pm

captura-de-pantalla-2016-12-09-a-las-5-36-36-pm

RiTa’s reference page provided me with the accurate syntax/template codes to complete this program.


As for actually creating the bot, Temboo was my go-to source for the implementation. It provided me with many outlets to create a bot with, but Twitter was my final choice. I had to go through some hoops (well, not really… I just needed to apply for the OAuth keys and tokens and connect them with the account) to get it up and running but it works and I’m quite happy about that!
captura-de-pantalla-2016-12-09-a-las-5-36-16-pm

In the end, sometimes the bot really has a hard time making sense. They may not always be syntactically correct or have and contextual information but they’re humorous, relatable (1 out of every 5 times I suppose), and poetic. It’s as if the person who would be behind this is too overwhelmed with their thoughts to make coherent sentences sometimes. We’ve all been there.

Stay spooky, my dark, damaged friends!

-Rhea

Leave a Reply