Neural translation system bridging English and Moroccan Darija using state-of-the-art NLP techniques.
# English ↔ Darija Translator 🇲🇦
A bidirectional neural machine translation model for translating between English and Moroccan Darija (Moroccan Arabic dialect), built using state-of-the-art transformer architecture.
## 🎯 Project Overview
This project aims to bridge the communication gap between English and Moroccan Darija by providing an accurate, bidirectional translation system. The model is fine-tuned on the **facebook/nllb-200-distilled-600M** multilingual transformer, specifically adapted for the Darija dialect.
### Use Cases
- 💬 **Chatbots** - Enable multilingual customer support
- 📚 **Educational Applications** - Language learning tools
- 🌍 **Cross-cultural Communication** - Breaking language barriers
- 📱 **Mobile Applications** - Real-time translation services
## ✨ Features
- **Bidirectional Translation**: English → Darija and Darija → English
- **State-of-the-art Model**: Fine-tuned NLLB-200 (600M parameters)
- **High Performance**: BLEU score ≥ 25-30 on test corpus
- **Robust Preprocessing**: Advanced text normalization and tokenization
- **Easy to Use**: Simple API for integration
## 🏗️ Architecture
```
Corpus (English ↔ Darija)
↓
Preprocessing (Normalization, Tokenization)
↓
┌──────────────────┐
│ NLLB Transformer │
│ Encoder-Decoder │
└──────────────────┘
↓
Translation Output
```
## 📊 Model Performance
| Metric | Score |
|--------|-------|
| **BLEU** | ≥ 25-30 |
| **METEOR** | High semantic alignment |
| **chrF** | Character-level accuracy |
| **Evaluation Loss** | 1.54 |
## 🚀 Quick Start
### Prerequisites
```bash
Python 3.8+
PyTorch 2.0+
CUDA-compatible GPU (recommended)
```
### Installation
```bash
# Clone the repository
git clone
github.com
cd english-darija-translator
# Install dependencies
pip install -r requirements.txt
```
### Usage
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
# Load the model
model_name = "NeoAivara/English_to_Dari …