Inspiration
Twitter bots are popping up more and more, especially ones using machine learning. It's fun to see how close bots will get to reality while still having an absurdist tone.
What it does
When you tweet "@urbdicbot define (insert whatever you want here)" the bot goes through 400,000 defintions scraped from Urban Dictionary and uses machine learning to give you a definition.
How we built it
The first thing we had to do was scrape the definitions from Urban Dictionary. There were over 400,000 definitions with over 1 million words so we had to put it into four parts. We used python for the entire project, since it was fast and worked nicely with the Tweepy API. Since Twitter's official API doesn't have all the functions we need, we used a third party API that was much more powerful. Our bot uses a Markov chain to print the definitions, which basically goes through the Urban Dictionary data to see the most relevant next word.If it can't find a definition to your word it will give you a different one.
Challenges we ran into
Handling the data was difficult because the raw size of the data was over 900MB. No one in the team had worked with machine learning, and only two members of the team were familiar with python. Since no one was experienced in machine learning or twitter bots the project required a lot of initial research, but we found enough resources online to make it work.
Accomplishments that we're proud of
The Markov's chain worked better than we ever imagined, and despite the huge amount of data the bot works faster than we expected. Ultimately, since we were so inexperienced in this technology we're pretty excited that it all came together so nicely
What we learned
Since we had to research a good bit about machine learning we learned more about the entire field. Two of our members had to learn python from scratch. We also had to go through several twitter bots and read on the twitter bot etiquette. Basically, we went into this project nearly completely fresh.
What's next for Fake Urban Dictionary Bot
As time goes on Fake Urban Dictionary Bot will only get smarter. There isn't a lot more functionality we can add to Fake Urban Dictionary Bot as of right now, but we would definitely consider making twitter bots in the future.
Built With
- python
- tweepy
- visual-studio-code
Log in or sign up for Devpost to join the conversation.