# π Darija Sentiment Analysis Project
A comprehensive sentiment analysis application for Arabic/Darija text that combines web scraping, machine learning, and deep learning to analyze public sentiment from news articles and comments.
## π― Project Overview
This project provides an end-to-end solution for sentiment analysis of Arabic/Darija text, featuring:
- **Web scraping** from Hespress news website
- **Traditional machine learning** models (SVM, KNN, Naive Bayes)
- **Deep learning** models (Bidirectional LSTM, CNN)
- **Interactive web interface** for real-time analysis
- **Comprehensive text preprocessing** for Arabic/Darija text
- **Visualization tools** including word clouds and sentiment charts
## π Project Structure
```
darija-sentiment-analysis/
βββ app.py # Main Flask application
βββ package.py # Core scraping and preprocessing functions
βββ requirements.txt # Python dependencies
βββ .env # Environment variables (API keys)
βββ .gitignore # Git ignore rules
βββ .gitattributes # Git LFS configuration
βββ README.md # Project documentation
βββ sentiments analysis/
β βββ ml.ipynb # Machine learning notebook
βββ models/
β βββ model/
β βββ model.safetensors # Pre-trained DarijaBERT model
βββ templates/ # HTML templates for web interface
β βββ index.html # Homepage
β βββ results.html # Search results page
β βββ comments.html # Individual article comments
β βββ all_comments.html # Aggregate sentiment analysis
βββ static/ # Static files (CSS, JS, images)
βββ Stop_words.csv # Darija/Arabic stopwords dataset
```
## π Notebooks Overview
### `sentiments analysis/ml.ipynb`
A comprehensive Jupyter notebook that implements and compares multiple sentiment analysis approaches:
## β¦