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:
- Collect image of text in TIF format - scan a sample document printed in the desired font, or create a new sample document
- 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".
python traininscript.py language fontname
Code licensed under Apache License v2.0