# Ibani Translator 🌍
A neural machine translation system for English to Ibani language using Hugging Face transformers.
## Features
- **Neural Translation**: Fine-tuned ByT5 model for English to Ibani translation
- **REST API**: FastAPI service with interactive documentation
- **Training Pipeline**: Train custom models on your own Ibani data
- **Batch Translation**: Translate multiple texts efficiently
- **Model Hosting**: Ready for deployment to Hugging Face Hub
## Quick Start
### 1. Install Dependencies
```bash
pip install -r requirements.txt
```
### 2. Start API Server
```bash
python api_server.py
```
The server will start at `
localhost`
Visit `
localhost` for interactive API documentation.
### 3. Use the API Client
```bash
python api_client.py
```
## Project Structure
```
ibani-translator/
├── api_server.py # FastAPI server
├── api_client.py # API client with examples
├── API_USAGE.md # Comprehensive API documentation
├── huggingface_translator.py # Neural translation core
├── rule_based_translator.py # Grammar rules and fallback
├── train_from_ibani_eng.py # Model training script
├── ibani_dict.json # Ibani-English dictionary
├── ibani_eng.json # Training data source
├── ibani_eng.csv # Training data (CSV format)
├── ibani_eng_training_data.json # Formatted training data
├── ibani_model/ # Trained model files
├── requirements.txt # Python dependencies
└── README.md # This file
```
## Usage
### API Translation
#### Single Translation
```bash
curl -X POST "
localhost" \
-H "Content-Type: application/json" \
-d '{"text": "I am eating fish"}'
```
**Response:**
```json
{
"source": "I am eating fish",
"translation": "A nji fịarị",
"model": "ibani-translator"
}
```
#### Batch Translation
```bash
curl -X POST "
localhost" \
-H "Content-Type: application …