eMOP Quick Start Guide for Aletheia and Franken+

Aletheia and Franken+ are key tools used by the eMOP team to create early-modern typeface training for Tesseract. Here are some quick tips on getting started with using them. They both have much more functionality though so continue to explore these two great tools.

Aletheia Quick Start

Aletheia is a ground truth creation tool developed by eMOP collaborators PRImA Research Labs at the University of Salford, UK. For eMOP we are using it to identify the glyphs on a set of high-quality page images printed in a typeface with which we want to train Tesseract.

  1. Open Aletheia tool
  2. Click on Start New Document - Image File
  3. Find tiff image file
  4. Continue without B&W

Process Image

  1. Click on Image tab
  2. Click on Threshold in Binarization window
  3. Go with default, or try experimenting with different settings
  4. Click on Remove Noise
  5. Go with default, or try experimenting with different settings
  6. Click save B/W. Save this file in a separate folder from the original file image. Maybe a subfolder?

Find Glyphs

  1. Click on Regions tab
  2. Click on Analyze Page in Auto window
  3. Select Glyphs, words, lines, and regions with text in Analysis Depth window. You may have to close and reopen the B/W image to run analysis
  4. Click on Glyphs tab to see individual glyphs

Correcting Text

  1. Check Text Overlay box in Text window
  2. Move cursor (hand) over a line to see it's text, or click Select all in Actions window to see all
  3. If you see something wrong click on the box around that glyph
  4. Click on Text Content in Text Window (or F11)
  5. Erase the old value and enter the correct text in this window. Common ligatures and special characters are available for selection at the bottom or you can enter your own Unicode value. Use Google or check here for Unicode values: http://www.russellcottrell.com/greek/utilities/UnicodeRanges.htm or the MUFI data set
  6. Click Save

Correcting Boxes

  1. Click Edit in Basic Tools window to resize or move existing boxes
  2. Click Select in Basic Tools to delete existing boxes
  3. Click Rectangle in Draw Contour window to draw a new box
  4. Use steps above to assign text value to new glyph box

Saving XML

  1. Click on the Save As... icon at the top left. Be sure to save with the same name as the b/w image, and in the same folder, with .xml extension

Franken+ Quick Start

Franken+ is a tool developed at the IDHMC for eMOP which allows us to select just the best exemplars of the glyphs discovered by Aletheia to create ideal early-modern typeface training for Tesseract.

Create a Language

This is not related to the actual language you're using, it's just a reference to your font training.

  1. Click on Create Language and give yours a name. 3-4 letters is the standard

Create a Font

  1. Click the Create button under Font:
  2. In the new window enter a name in the Font Name box
  3. If it's an italic font, click the Italic box. If it's a blackletter (gothic) font, click the Fraktur box
  4. Click Save Font

Ingest Aletheia files (TIF/XML pairs)

  1. Make sure that your Language and Font fields at top are selected
  2. In Aletheia TIF/XML box enter the path to a folder that contains the set of Aletheia files you created
  3. Click Ingest Glyphs button

Edit Font

  1. Set the Language and Font fields
  2. Click on edit button
  3. In the new window click on the pull down menu under Glyphs
  4. Using the Display Size slider at the bottom to get a better view of the letters
  5. Usually it's easiest to click the Remove All button and then click on the exemplars you like to add them back. We've found 5 is a good number (when available: I'm looking at you Q, X and Z)
  6. But if you see some exemplars that are simply wrong, or so bad they're not worth keeping, then it's best to first choose those and hit Delete Removed. a smaller set of glyphs is easier to edit and cleaning out the DB helps its performance
  7. Alternatively, you can reclassify glyphs that are of good quality but have been assigned the wrong Unicode value
    1. Select the glyph, then click the Reclassify Glyph button above the editing window
    2. You can either assign it to a new glyph that already exists in your set with the pull down menu, or assign it a Unicode value if it isn't in your set
  8. You can also edit the images if you have Photoshop on your computer, but be careful about doing that
    1. Right click on the exemplar and select Edit Image
  9. When you're done click the Save button

CreateTIFF/Box File Pairs

Select a text file to transcribe using your new training set in the Synthesize TIF/Box Pair area. We have one we use that includes all of the special characters and ligatures we've encountered in our work with early modern documents. It's here: F+TraininigText.txt. But you may want to make your own.

  1. Put in the path to the text file.
  2. Click Create TIF/Box Pairs

Create Tesseract Training

  1. Click the Train Tesseract button
  2. Pick the font (or fonts for a combo) from the list
  3. Add any dictionary or ambiguity files
  4. Click Make Library button
  5. Go get a coffee or see a baseball game