Back to featured work
Arabic NLP · Sentiment SystemsPrototype

JorSenti-LoRA

Handle Jordanian and Levantine sentiment analysis where slang, sarcasm, and neutral sentiment routinely break generic Arabic classifiers.

Hosted JorSenti-LoRA comparison for one Arabic Jordanian review, showing a Negative baseline MARBERTv2 result at 35.9% and a Positive JorSenti-LoRA result at 98.7%.
Hosted MARBERTv2 comparison. One recorded Jordanian-review inference: baseline MARBERTv2 predicts Negative at 35.9%, while JorSenti-LoRA predicts Positive at 98.7%. This is an example output, not aggregate evaluation.
Problem
Generic Arabic sentiment models miss Jordanian slang, sarcasm, and neutral reviews.
What I built
A MARBERTv2 + LoRA sentiment engine with weighted loss and a Hugging Face demo.
My role
Project author: adaptation strategy, training, experiment tracking, deployment.
Result
README-reported neutral recall of 78.5%, up from a 22.0% baseline.
Jordanian ArabicMARBERTv2LoRA / PEFTWeighted lossMLflowDockerizedHugging Face Spaces

Evidence

More recorded proof

Repository comparison table with four Jordanian Talabat reviews and predicted sentiment labels from the Scalpel model and standard AraBERT.

Repository inference comparison

Repository screenshot comparing four Talabat review examples from the Scalpel model and standard AraBERT. It is a qualitative inference view; its comparator differs from the hosted MARBERTv2 comparison and it is not an aggregate evaluation.

Evaluation

README-reported evaluation

The project README reports these baseline-v1 and JorSenti-LoRA-v2 scores. The repository describes the v1 baseline as AraBERT and the v2 model as MARBERTv2 with LoRA.

Condition: Reported baseline v1 versus JorSenti-LoRA v2 results

Accuracy
94.35%
86.2% baseline
F1 score
93.87%
84.1% baseline
Neutral Recall
78.5%
22.0% baseline

The README reports higher overall scores and a larger Neutral Recall for v2. These are repository-reported results, not metrics recomputed for this portfolio.

Problem

What this project had to solve

Generic Arabic sentiment models struggle with Jordanian slang, sarcasm, and class imbalance, especially when the neutral class gets ignored. This project focuses on making sentiment classification behave better on local Talabat-style language.

Role / contribution

What I owned in the system

Project author responsible for the adaptation strategy, training setup, experiment tracking, and deployment packaging described in the repository.

Architecture flow

System flow from input to output

Step 01

Review pipeline

What happens

Talabat-style review data is prepared to expose dialect-heavy customer language.

Why it matters

The input pipeline determines whether the model actually sees the slang-heavy language the project is trying to handle.

Engineering decisions

Tradeoffs that shaped the build

  1. Decision 01

    Use LoRA instead of full fine-tuning

    Parameter-efficient adaptation keeps the training path practical while still specializing the model.

  2. Decision 02

    Bias optimization toward neutral recall

    Weighted loss is a targeted fix for the exact failure mode the README calls out.

  3. Decision 03

    Treat deployment as part of the project

    The repo goes beyond training by packaging an interface and experiment-tracking workflow.

Technical implementation

How the system is built

The model stack adapts MARBERTv2 with PEFT/LoRA so the training path stays practical on local hardware while remaining specialized for the task.

A weighted cross-entropy loss is used to push the model to respect the neutral class instead of collapsing toward majority sentiment behavior.

The repository documents experiment tracking with MLflow and packages a hosted interface for Hugging Face Spaces.

Stack

Core tools and system layers

PythonPyTorchMARBERTv2LoRA / PEFTMLflowDockerStreamlitHugging Face Spaces

Project explainer

Ask about this project

A case-study guide to the architecture and decisions behind JorSenti-LoRA.