This repository contains the codebase for my senior design project titled “Analysis of Text Data via NLP Tools”, which focuses on the application of Natural Language Processing (NLP) models to understand and classify text data in three real-world tasks:
- Sentiment Analysis
- Offensive Language Detection
- Disaster Help Classification
Each task was approached using state-of-the-art transformer-based models such as BERT and RoBERTa, along with rule-based techniques for enhanced interpretability and performance.
The project is divided into three main modules:
- Model: Pretrained
bert-base-uncased - Task: Classify texts as positive, negative, or neutral
- Data: Custom-labeled social media posts (can be replaced with any sentiment-labeled dataset)
- Highlights:
- Fine-tuned BERT with attention masking and padding
- Clean data preprocessing and tokenization
- Evaluation using accuracy, precision, recall, F1-score
- Model: Pretrained
roberta-base - Task: Detect offensive, abusive, or inappropriate language
- Data: Public offensive language datasets (like OLID or custom Twitter data)
- Highlights:
- RoBERTa fine-tuned on binary classification
- Applied model interpretability with LIME and SHAP
- Confusion matrix and detailed error analysis included
- Model:
bert-base-uncasedcombined with rule-based regex filtering - Task: Classify whether a tweet is a request for help during disasters
- Data: Real-time disaster tweets (e.g., CrisisNLP, CrowdFlower)
- Highlights:
- Hybrid model combining deep learning and traditional NLP
- Regex to catch patterns like "need food", "send help", etc.
- Fused model output for better precision in emergency contexts
- Python 3.9+
- PyTorch
- HuggingFace Transformers
- Scikit-Learn
- Pandas, NumPy, Matplotlib, Seaborn
- Regex
- LIME / SHAP for model explainability
- Jupyter Notebooks
| Task | Model | Accuracy | F1-Score |
|---|---|---|---|
| Sentiment Analysis | BERT | ~87% | ~0.86 |
| Offensive Detection | RoBERTa | ~91% | ~0.90 |
| Disaster Help Detection | BERT + Regex | ~89% | ~0.88 |
-Expand multi-language support (e.g., Turkish, Azerbaijani) -Integrate into a web dashboard for real-time monitoring -Enhance explainability tools for broader model transparency
Fuad Garibli B.Sc. in Computer Engineering, Sakarya University Passionate about NLP, Data Science, and Social Impact 📫 www.linkedin.com/in/fuad-garibli-936354272