# English to Darija Translator π¬π§β‘οΈπ²π¦
A simple yet clever web-based **English to Darija (Moroccan Arabic)** translator built with Flask.
## π§ How it Works
- Uses a large Created Manualy dataset of EnglishβDarija phrase pairs stored in `dataset.csv`.
- Translates full sentences or phrases using a combination of:
- Phrase matching
- Word-by-word translation
- Text correction via `TextBlob`
- Learns over time β users can add new phrase pairs through the interface.
## π₯οΈ Features
- Translate English sentences into Darija.
- Add your own phrases to the dataset.
- Intelligent matching for multi-word phrases.
- Auto-correction for better translation accuracy.
## π Getting Started
### 1. Clone the repository
```bash
git clone
github.com
cd your-repo-name
```
### 2. Install dependencies
```bash
pip install -r requirements.txt
```
Make sure you also download NLTK's tokenizer data:
```python
import nltk
nltk.download('punkt')
```
### 3. Run the app
```bash
python app.py
```
Then open your browser at `
127.0.0.1`.
## ποΈ Dataset
The translator uses a CSV dataset (`dataset.csv`) where each row is a pair:
```
darija,english
```
Example:
```
labas 3lik,how are you
```
## π File Structure
```
βββ app.py # Main Flask app
βββ last.py # Core translation logic and helper functions
βββ dataset.csv # Translation data
βββ templates/
β βββ try.html # HTML interface
```
## π
Project Info
- **Created:** April 2024
- **Made by MOHAMMED EL KASSOIRI, HICHAM MIMOUNI ET RIMA ENNAJI**
---
Feel free to contribute or suggest improvements!