# The Ultimate Technical Guide to the Algerian Darija Sentiment Analysis Pipeline
## 1. Project Philosophy and Goals
This project was born from a desire to create a truly comprehensive, end-to-end solution for sentiment analysis on a specific, nuanced dialect: Algerian Darija. The goal was not just to build a model, but to engineer a complete, reproducible, and easy-to-understand pipeline. This document serves as an exhaustive guide to every single component of that pipeline, from the initial setup to the final interactive model. We will dissect every line of code, every architectural choice, and every data source to provide a crystal-clear understanding of how this system works.
---
## 2. Section 1: Installation and Dependencies
The foundation of any Python project is its dependencies. The script ensures a smooth setup by installing all necessary libraries at the very beginning.
**Command:**
```bash
!pip install numpy pandas scikit-learn matplotlib seaborn torch torchvision torchaudio --quiet
!pip install pyarabic arabic-reshaper python-bidi nltk arabic-stopwords kagglehub wordcloud gdown --quiet
```
**Dependency Breakdown:**
| Library | Purpose & Role in the Project |
| :--- | :--- |
| `numpy` | The fundamental package for numerical computation. Used for handling arrays and mathematical operations. |
| `pandas` | The primary tool for data manipulation and analysis. Used to load, clean, and structure all datasets in DataFrames. |
| `scikit-learn` | A key machine learning library. Used here for splitting data (`train_test_split`) and for evaluation metrics (`classification_report`, `confusion_matrix`, `accuracy_score`). |
| `matplotlib` | The primary plotting library. Used to create all visualizations, including training history and confusion matrices. |
| `seaborn` | Built on top of Matplotlib, it provides a high-level interface for drawing attractive and informative statistical graphics. |
| `torch` | The core deep learning framework. Used to build, train, …