Logo Lanfrica

MenelikBerhan/ethiopic

Domaine:

natural language processing

Type de record:

software
Créateur:
Men
Hôte:
Fork of `amharic_ocr` repo to Practice Training Tesseract using tesseract-ocr/tesstrain repo # Menelik's Berhan Ethiopic Script OCR app ## Introduction Menelik's Berhan (loosely translated as Menelik's light) is a command line interface app that performs OCR on image and pdf files with Ehtiopic (Amharic/Gee'z) script. Its developed with the intention of using it for a web/mobile app of old Amharic and Gee'z dictionaries. __Implemented and Tested on Ubuntu 20.04 with Python 3.8__ ### Project Blog Article ## Installation #### Install tesseract ``` sudo apt update # (optional) for version 5.* add this repository sudo add-apt-repository ppa:alex-p/tesseract-ocr-devel sudo apt install -y tesseract-ocr sudo apt update ``` #### Clone the repo ``` git clone github.com cd amharic_ocr_draft ``` #### (Optional) Set up a python vertual environment using venv: Its recommended to setup a python vertual environment before installing requirements: ``` sudo apt install -y python3.8-venv python3 -m venv .venv source .venv/bin/activate ``` #### Install required packages using pip: ``` python3 -m pip install --upgrade pip python3 -m pip install -r requirements.txt ``` #### Start the app: ``` ./ocr.py ``` ## Usage The CLI has three commands: - `help` for displaying help txt - `image` for performing OCR on image files, - `pdf` for performing OCR on pdf files and - `default` for diplaying or setting default parameters. ### `help` ``` Usage: help Displays list of available commands Usage: help Display detailed help about the specific command ``` ### `image` and `pdf` ``` Usage: [image|pdf] INPUT_FILE [OUTPUT_FILE] [OPTION]... or: [image|pdf] -i INPUT_FILE... [-o OUTPUT_FILE] [OPTION]... or: image|pdf [{INPUT_FILE|-i INPUT_FILE...}] -s INPUT_DIRECTORY [-o OUTPUT_FILE] [OPTION]... Perform OCR on INPUT_FILE/s and output to OUTPUT_FILE. Perform OCR on INPUT_FILE/s or on all image|pdf files located in INPUT_DIRECTORY, and output to OUTPUT_FILE. Multiple INPUT_FILEs can be given using the -i option. If OUTPUT_FILE is no …