This project demonstrates the use of machine learning classification algorithms and neural networks for emotion detection in textual data. these notebooks cover the main points and are a continuation of the work I did in my Master Thesis "Text analysis in social networks and emotional content recognition".
The dataset used in this project contains 6 different emotions (happy, sad, anger, fear, disgust and surprise) expressed in short texts. The dataset is preprocessed and split into training and test sets.
The project uses machine learning classification algorithms (Naive Bayes, SVM, Random Forest) for comparison with the neural network. The neural network architecture consists of an embedding layer, a bidirectional LSTM layer, and a fully connected output layer with softmax activation. The model is trained on the training dataset and evaluated on the test dataset.
- Python 3.x
- Keras
- NumPy
- Pandas
- Scikit-learn
- NLTK
- Clone the repository:
git clone https://github.com/your-username/emotion-detection.git- Install the required packages:
pip install -r requirements.txtThe performance of the machine learning classification algorithms and neural network is evaluated using accuracy, precision, recall, and F1-score metrics. The results show that the neural network outperforms the machine learning classification algorithms in terms of accuracy and F1-score.
The project demonstrates the use of machine learning classification algorithms and neural networks for emotion detection in textual data. The results show that the neural network outperforms the machine learning classification algorithms in terms of accuracy and F1-score. The project can be further extended to other datasets and domains.