This project was created to automatically translate the book of Clementos from ethiopian bible
# Amharic OCR & Translation Pipeline (GUI Automation)
## 📌 Overview
This project was created to **automatically translate the book of Clementos**.
The original material was a **scanned PDF** containing **Amharic and Ge'ez (Gueez)** text.
Because the document was image-based, no direct text extraction was possible.
To solve this, we built a **step-by-step automation pipeline** combining external tools and custom scripts.
High-level workflow:
1. **Scanned PDF → cropped images**
2. **Images → Amharic text (OCR)** using Google Translate
3. **Amharic text → English (or other languages)** using ChatGPT
---
## 🧠 Why This Approach?
### ❌ What does NOT work well
* ChatGPT: image → Amharic text (OCR) ❌
* Google Translate: image → English translation ❌ (quality is not satisfactory)
### ✅ What works better
* Google Translate: image → **Amharic text only** ✅
* ChatGPT: **Amharic text → English (or other language)** ✅
➡️ This project automates that exact workflow.
---
## 🧩 Project Structure
```
project/
├── ExtractTextImage.py # Google Translate OCR automation (image → Amharic text)
├── ChatGPTScraper.py # ChatGPT automation (Amharic text → translation)
├── bouton_parcourir.png # UI reference image (Browse button)
├── bouton_copier.png # UI reference image (Copy button)
├── bouton_close.png # UI reference image (Close button)
├── copy.png # UI reference image (ChatGPT copy button)
├── images/ # Folder containing Amharic images
├── outputChatgpt.txt # Translation output
└── README.md
```
---
## 📄 Source Preparation (PDF → Images)
The book of Clementos was provided as a **scanned PDF** mixing **Amharic and Ge'ez**.
We used **
ilovepdf.com** for preprocessing:
* Crop pages to remove the Ge'ez text
* Convert each PDF page into a separate **JPG image**
These images are then used as input for the OCR step.
---
## ⚙️ Requirements
* Python 3.9+
* Firefo …