Project Title: AIrony: Detecting Irony Using Machine Learning
BASIS Advisor: Mr. Linhares
Internship Location: Haker Dojo
Onsite Mentor: Dr. Jelena Mitrovic
My project aims to try and help intelligent systems more efficiently communicate with humans. Detecting figures of speech is important in recommender systems which are used in popular websites such as Amazon and Netflix for personalizing content. Specifically, my project attempts to solve the problem of detecting irony using AI. The goal of this project, conducted at Hacker Dojo, is to experiment with various AI techniques, ranging from deep learning to machine learning to distributional semantics, in order to create a system that accurately detects the two main kinds of verbal irony: context based and context-less. This project will employ recurrent neural networks and other kinds of classifiers, particularly decision tree and support vector machine classifiers. I will first create a multi-step machine learning solution for detecting irony which would involve multiple classifiers focusing on different parts of the task. The ideal goal would be to create a one-size-fits-all model, potentially using deep learning. It would recognize patterns in examples of irony, such as similes, and then determine the likelihood of finding irony given the existence of these patterns. Another main segment of this project involves training word-to-vector convertors (often called word embeddings) for the specific task of detecting irony, essentially “priming” the data for various numerical classifiers. The findings of this project can be used in AI bots specialized in Natural Language Processing.
My Posts
Week 11 and 12 – Presentation and Practicing
Nothing much went on for these two weeks. I mainly worked on my presentation and practiced presenting to a few people.
Week 11 – Fine Tuning the Model and Reviewing Facts
I met with my internal advisor, Mr. Linhares, this week and shared my results from the previous weeks. He recommended that I try for higher accuracy in my Universal Sentence Encoder model, and I made the neural network deeper and tuned the regularization parameter. Indeed, I got a higher accuracy of around 95-96% on the […]
Week 10 – Developing the Universal Sentence Encoder Model
I finally finished developing what I believe is my last model. I implemented Google’s Universal Sentence Encoder using a regular feed-forward neural network with 4 fully connected layers of 512 nodes (input), 256 nodes, 128 nodes, and lastly 2 nodes (output). I realized I was getting a vast difference between my training data performance and […]
Week 9 – A Little More Reading
While looking into embeddings, I found out about Google’s Universal Sentence Encoder. This is unlike the other embeddings I’ve used in the past because it is not as “naive” as the other ones. By this, I mean that the embedding has been trained in a different way entirely in comparison to Word2Vec and GloVe, and […]
Week 8 – Developing the Second Model
This week, I used Logistic Regression on SciKit learn yet again. This time, however, I used embeddings. I found an embedding trained by Google on Google News articles. I decided to stick with a Logistic Regression classifier for this one because there were only 50 dimensions in the embedding. This means that each word representation […]
Week 7 – Reading on Embeddings and TensorFlow
I brushed up on TensorFlow and Keras. Although I have used these tools before, it was a while since I did a complete project using either of them, so I looked over some old projects to remind myself of the syntax and functions. At the same time, I read up on embeddings and how they […]
Week 6 – Finishing the First Model
I apologize for the delay in the blog updates. This week, I finished the model and got my first results. If the model was purely guessing as to which is ironic or not, the accuracy of the model would be 50%. My model was able to do significantly better and managed a 77% accuracy on […]
Week 5 – Developing the Model
This week, I developed the model using TF-IDF analysis. I was able to create a large matrix for all the TF-IDF values. Although this feature is built-in to SciKit Learn on Python, I found that building the algorithm myself from the ground up would be a good learning experience. However, my algorithm was not 100% […]
Week 4 – Setting Up Environment
This week was pretty uneventful. I ran into a lot of bugs trying to set up an IPython environment on my computer. Python was acting strange, and I had to resort to reinstalling it. I want to use Jupyter Notebooks for Pandas graphing in particular, so I was insistent on getting the environment set up. […]
Week 3 – Interesting Features
This week, I took a deeper look at the different examples of irony. I was hoping to find something noteworthy that can be used to generalize across all examples of irony, but my findings were not fruitful. I had seen past work done in this field where researchers were focusing on similes and looking at […]
Week 2 – Cleaning Data
This week, I continued sifting through quotes and Tweets. Since other humans label the Tweets/quotes as ironic, there is room for error. Because of this, the process took longer than expected as I had to edit some of the Tweets. Although I tried to make a script to replace texting shortcuts in Tweets, there were […]
Week 1 – Data Collection and Planning
To start my project, I began looking for data: sentences and phrases containing irony and sarcasm. I decided to look towards Twitter data first since these are more commonly used in other papers. I signed up for the Twitter Developer API and began searching for Tweets with the hashtag #irony and #sarcasm. I wrote a […]