This project was developed as part of my M.Tech Final Year (Phase-I) project. The objective is to classify tweets into Hate and Non-Hate categories using context-aware deep learning techniques and emoji-enhanced textual representations.
The project uses the Olympics Twitter dataset and incorporates emoji information to improve the understanding of tweet context and sentiment.
- Dataset cleaning and preprocessing
- Removal of unwanted characters and noise
- Text normalization
- Manual emoji integration and emoji-aware tweet representation
Two feature extraction techniques were implemented:
- GloVe (Global Vectors for Word Representation)
- Unigrams
- Bigrams
- Trigrams
Although multiple N-Gram approaches were explored, Bigrams were primarily used in the classification models.
The following models were developed and evaluated:
- LSTM with GloVe Embeddings
- Bi-LSTM with GloVe Embeddings
- LSTM with Bigrams (Top 10 Features)
- LSTM with Bigrams (Top 5000 Features)
- Bi-LSTM with Bigrams (Top 10 Features)
- Bi-LSTM with Bigrams (Top 5000 Features)
To improve contextual understanding, DBSCAN clustering was integrated with the extracted features and combined with:
- LSTM + Attention Mechanism
- Bi-LSTM + Attention Mechanism
Model performance was evaluated using:
- Accuracy
- Precision
- Recall
- F1-Score
- Confusion Matrix
- All implementations were developed using Jupyter Notebook.
- Some ZIP files included in the repository contain datasets and outputs generated during program execution.
- Transfer Learning experiments were also attempted; however, training and execution required significant computational resources and time.
- Python
- Jupyter Notebook
- TensorFlow
- Keras
- Scikit-Learn
- GloVe Embeddings
- DBSCAN Clustering
- LSTM
- Bi-LSTM
- Attention Mechanism
- N-Grams
Olympics Twitter Dataset
Hate Speech Detection
Output Classes:
- Hate
- Non-Hate
As an extension of the project, Transfer Learning was explored to improve hate speech classification performance.
Transfer Learning experiments were conducted using a pre-trained hate speech classification dataset. Preliminary implementations were developed to transfer learned knowledge to the Olympics Twitter dataset. Due to training time and hardware limitations, the experiments remain a work in progress and are included as a foundation for future research.