Logo Lanfrica

Sam-Tek/Amharic-Text-Extraction-and-Translation

Domain:

natural language processing

Record type:

software
Creator:
Sam
Host:
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 …