OCR

Paid OCRs

Improving OCR Accuracy

  • Scan Tailor is an interactive post-processing tool for scanned pages. It performs operations such as page splitting, deskewing, adding/removing borders, and others. You give it raw scans, and you get pages ready to be printed or assembled into a PDF or DJVU file. Scanning, optical character recognition, and assembling multi-page documents are out of scope of this project.
  • Improving OCR Accuracy

Tesseract-ocr

Training Tesseract

Config Files and Augmenting With User Data

  • Extracted from: here
  • Tesseract config files consist of lines with variable-value pairs (space separated). The variables are documented as flags in the source code like the following one in tesseractclass.h:
STRING_VAR_H(tessedit_char_blacklist, "", "Blacklist of chars not to recognize");

These variables may enable or disable various features of the engine, and may cause it to load (or not load) various data. For instance, let’s suppose you want to OCR in English, but suppress the normal dictionary and load an alternative word list and an alternative list of patterns — these two files are the most commonly used extra data files.

If your language pack is in /path/to/eng.traineddata and the hocr config is in /path/to/configs/hocr then create three new files:

/path/to/eng.user-words:

the
quick
brown
fox
jumped

/path/to/eng.user-patterns:

1-\d\d\d-GOOG-411
www.\n\\\*.com

/path/to/configs/bazaar:

load_system_dawg     F
load_freq_dawg       F
user_words_suffix    user-words
user_patterns_suffix user-patterns

Now, if you pass the word bazaar as a trailing command line parameter to Tesseract, Tesseract will not bother loading the system dictionary nor the dictionary of frequent words and will load and use the eng.user-words and eng.user-patterns files you provided. The former is a simple word list, one per line. The format of the latter is documented in dict/trie.h on read_pattern_list().

Details of Training Tesseract 3

Details of training tesseract 3