Skip to content

hoverslam/nlp-text-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spam Detection & Emotion Analysis with DL models

Struggling with spam or deciphering online sentiment? This repository delves into text classification using two powerful deep learning techniques: LSTM and fine-tuned DistilBERT. Explore how these models tackle real-world tasks like detecting unwanted emails and identifying emotions in tweets.

Installation

  1. Clone the repository:
git clone https://github.com/hoverslam/nlp-text-classification/
  1. Install the dependencies:
pip install -r requirements.txt
  1. Run the notebooks:

Results

Spam detection

Accuracy Precision* Recall* F1-score*
LSTM 0.9559 0.9541 0.9545 0.9543
DistilBERT 0.9886 0.9886 0.9877 0.9882

Emotion analysis

Accuracy Precision* Recall* F1-score*
LSTM 0.8643 0.8242 0.8253 0.8241
DistilBERT 0.9260 0.8912 0.8879 0.8891

* macro-average

License

The code in this project is licensed under the MIT License.