End-to-end MLOps pipeline and NLP engine analyzing Levantine/Jordanian Arabic sentiment using a custom PEFT/LoRA architecture (MARBERTv2).
See the codeProject Milestone: End-to-End MLOps & Research Phase
Developed by: The Debuggers (Jordan University of Science & Technology)
The latest iteration of the model (JorSenti-LoRA) is containerized and currently hosted live on Hugging Face Spaces. 👉 Click here to test the live diagnostic engine
This project is an end-to-end Machine Learning Operations (MLOps) pipeline and specialized sentiment diagnostic engine. Standard NLP models fundamentally fail when processing local slang, sarcasm, and "Neutral" sentiment bias.
We built this pipeline to handle the extreme linguistic complexities of the Levantine/Jordanian street dialect. It proves that targeted Domain Adaptation can drastically outperform baseline foundational models on hyper-local retail and food delivery (Talabat) data.
This project evolved from a baseline neural network into a highly optimized, context-aware engine.
aubmindlab/bert-base-arabertv02-twitter to establish a performance baseline.Penalty Ratios: [Negative: 1.2, Neutral: 3.0, Positive: 0.8]). This forces gradient descent to prioritize the nuanced features of the minority Neutral class.| Metric | Baseline (v1) | JorSenti-LoRA (v2) |
|---|---|---|
| Accuracy | 86.2% | 94.35% |
| F1-Score | 84.1% | 93.87% |
| Neutral Recall | 22.0% | 78.5% |
To prove the efficacy of our engineering, we subjected the model to edge cases that traditionally break standard Arabic AI models.
In Jordanian street slang, words that literally translate to violence, destruction, or negativity are actually used as high-tier compliments. Standard translation and base NLP models grade these as strictly Negative.
يا زلمة الشاورما سفاحة، يسعد دين المطعم (Literal: "The shawarma is a serial killer...")البرجر قطاعة، اشي فاخر على الآخر (Literal: "The burger is a cutting machine...")Proof that our targeted data augmentation successfully rewired the model's understanding of temperature modifiers.
البطاطا باردة ومجلدة مش راضية تتاكل (Cold and frozen fries) ➡️ Negative 🔴عصير برتقال بارد يسرح عالقلب (Cold orange juice) ➡️ Positive 🟢البوظة وصلت باردة وبتجنن (Cold ice cream) ➡️ Positive 🟢Proving the success of our Scalpel Weighted Loss function. The model accurately identifies hard-to-impress, middle-ground, and purely factual reviews instead of artificially inflating its score by guessing Positive or Negative.
التوصيل نص نص بس الاكل زاكي (The delivery is fine but the food was delicious).الاكل منيح بس السعر غالي شوي وما بشبع (Food is good but expensive and not filling).You can launch the live comparison dashboard on your local machine using either Docker or a standard Python environment. Ensure the talabat_augmented_scalpel weights folder is present in your active directory.
# 1. Clone the repository
git clone [https://github.com/YOUR-USERNAME/talabat-sentiment-analysis.git](https://github.com/YOUR-USERNAME/talabat-sentiment-analysis.git)
cd talabat-sentiment-analysis
# 2. Create and activate a fresh environment
conda create -n torch_env python=3.10
conda activate torch_env
# 3. Install dependencies & Launch
pip install -r requirements.txt
python -m streamlit run app.py
Abdullah AlJafari — AI Student at JUST, Jordan AI & ML Engineer | Computer Vision | NLP | MLOps
MIT License — see LICENSE for details.
End-to-end MLOps pipeline and NLP engine analyzing Levantine/Jordanian Arabic sentiment using a custom PEFT/LoRA architecture (MARBERTv2).
See the codeProject Milestone: End-to-End MLOps & Research Phase
Developed by: The Debuggers (Jordan University of Science & Technology)
The latest iteration of the model (JorSenti-LoRA) is containerized and currently hosted live on Hugging Face Spaces. 👉 Click here to test the live diagnostic engine
This project is an end-to-end Machine Learning Operations (MLOps) pipeline and specialized sentiment diagnostic engine. Standard NLP models fundamentally fail when processing local slang, sarcasm, and "Neutral" sentiment bias.
We built this pipeline to handle the extreme linguistic complexities of the Levantine/Jordanian street dialect. It proves that targeted Domain Adaptation can drastically outperform baseline foundational models on hyper-local retail and food delivery (Talabat) data.
This project evolved from a baseline neural network into a highly optimized, context-aware engine.
aubmindlab/bert-base-arabertv02-twitter to establish a performance baseline.Penalty Ratios: [Negative: 1.2, Neutral: 3.0, Positive: 0.8]). This forces gradient descent to prioritize the nuanced features of the minority Neutral class.| Metric | Baseline (v1) | JorSenti-LoRA (v2) |
|---|---|---|
| Accuracy | 86.2% | 94.35% |
| F1-Score | 84.1% | 93.87% |
| Neutral Recall | 22.0% | 78.5% |
To prove the efficacy of our engineering, we subjected the model to edge cases that traditionally break standard Arabic AI models.
In Jordanian street slang, words that literally translate to violence, destruction, or negativity are actually used as high-tier compliments. Standard translation and base NLP models grade these as strictly Negative.
يا زلمة الشاورما سفاحة، يسعد دين المطعم (Literal: "The shawarma is a serial killer...")البرجر قطاعة، اشي فاخر على الآخر (Literal: "The burger is a cutting machine...")Proof that our targeted data augmentation successfully rewired the model's understanding of temperature modifiers.
البطاطا باردة ومجلدة مش راضية تتاكل (Cold and frozen fries) ➡️ Negative 🔴عصير برتقال بارد يسرح عالقلب (Cold orange juice) ➡️ Positive 🟢البوظة وصلت باردة وبتجنن (Cold ice cream) ➡️ Positive 🟢Proving the success of our Scalpel Weighted Loss function. The model accurately identifies hard-to-impress, middle-ground, and purely factual reviews instead of artificially inflating its score by guessing Positive or Negative.
التوصيل نص نص بس الاكل زاكي (The delivery is fine but the food was delicious).الاكل منيح بس السعر غالي شوي وما بشبع (Food is good but expensive and not filling).You can launch the live comparison dashboard on your local machine using either Docker or a standard Python environment. Ensure the talabat_augmented_scalpel weights folder is present in your active directory.
# 1. Clone the repository
git clone [https://github.com/YOUR-USERNAME/talabat-sentiment-analysis.git](https://github.com/YOUR-USERNAME/talabat-sentiment-analysis.git)
cd talabat-sentiment-analysis
# 2. Create and activate a fresh environment
conda create -n torch_env python=3.10
conda activate torch_env
# 3. Install dependencies & Launch
pip install -r requirements.txt
python -m streamlit run app.py
Abdullah AlJafari — AI Student at JUST, Jordan AI & ML Engineer | Computer Vision | NLP | MLOps
MIT License — see LICENSE for details.