Skip to content
A script to partially automate the training of new fonts/languages with Tesseract 3.02
Branch: master
Clone or download
Latest commit 901a9ce Mar 21, 2013
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.txt First commit Mar 21, 2013
README.md First commit Mar 21, 2013
tesseract-trainer.py First commit Mar 21, 2013

README.md

python-tesseract-3.02-training

A script to partially automate the training of new fonts/languages with Tesseract 3.02 - part of the Open ICR Project: http://opensource.newmediaist.com/open-source-icr.html

The Tesseract OCR Engine is a powerful open source text recognition engine, designed specifically for machine-printed text (fonts). Tesseract can be trained to both improve recognition accuracy, as well as teach it new languages. Training Tesseract is just another way of saying adding new fonts to tesseract. Training Tesseract 3.02 can be difficult for the novice though, as the official instructions are long and complex. We built a simple Python script to somewhat automate the Tesseract 3.02 language file build process.

How to use

Usage of this script assumes Python and Tesseract are both installed correctly on computer, and also that you have already generated your training text and box files. If you have not generated your training text yet, here is one of the simplest methods to do so:

  1. Collect image of text in TIF format - scan a sample document printed in the desired font, or create a new sample document
  2. Upload TIF to this online box editor, and correct any errors in character detection. Select the box file information from the right side of the tool, copy it to your clipboard, and paste it into a new blank text file. Save the textfile with the same name as the document image, but with a .box extension - for example, "scanned-image.box".
Save your training image and box file into the same directory as the training script, then running the following command:

python traininscript.py language fontname

Code licensed under Apache License v2.0

You can’t perform that action at this time.