NonsenseBot
https://twitter.com/whatnonsense_ai
Using Python and a few free libraries, I built a Twitter bot for my artificial intelligence course at SCU. We were allowed quite a bit of freedom for this project, so I decided to make a bot that tweet out randomly created sentences based on the children's stories and poems it learned from.
Using Markov chains, my bot generates a sentence within Twitter's character limit. The sentences usually doesn't make much sense, hence why I named my bot the NonsenseBot. These sentences are also placed over an image of paper or a blank book to make the bot appear more human and creative.
On occasions where the program wasn't able to generate a proper sentence within the character limit, an error will occur. I decided to turn this bug into a feature of the bot by adding a catch to the program whenever this error occurs. Instead of ending the program, a different tweet will be sent out stating that there was "too much clutter" and the bot couldn't think of anything to post.
Libraries used:
-
markovify
-
tweepy
-
pillow