MFTRAINING(1)

πŸ’… MFTRAINING(1) β€” the mftraining girlies' manual

okay so bestie, welcome to mftraining from the MFTRAINING(1) section of the manual β€” she's the feature-training bestie for Tesseract and she's lowkey carrying the whole shape-prototype pipeline. let's get into it πŸ’–


✨ NAME ✨

mftraining β€” feature training for Tesseract. that's it, that's the vibe. πŸŽ€


✨ SYNOPSIS ✨

mftraining -U unicharset -O lang.unicharset FILE...

like, you hand her a unicharset, you tell her where the output unicharset goes, and then you yeet a whole list of FILE... at her. slay.


✨ DESCRIPTION ✨

so here's the tea πŸ«–: mftraining takes a list of .tr files and from those she generates three iconic little files:

  • inttemp β€” the shape prototypes πŸ‘‘
  • shapetable β€” the shape table, obviously
  • pffmtable β€” the number of expected features for each character

there's also a fourth file called Microfeat that this program writes too β€” but ngl, nobody uses it. it's just there. sitting. being written. not being used. πŸ’€ (not me getting attached to an unused file though 😭)


✨ OPTIONS ✨

  • -U FILE β€” (Input) the unicharset, the one generated by unicharset_extractor(1). this is the source-of-truth character set, bestie, treat her with respect πŸ’…
  • -F font_properties_file β€” (Input) the font properties file. every line looks like this, and every field except the font name is straight up 0 or 1 β€” no in-between, no "maybe", just binary energy:
*font_name* *italic* *bold* *fixed_pitch* *serif* *fraktur*
  • -X xheights_file β€” (Input) the x heights file. every line is this, where xheight is calculated as the pixel x height of a character drawn at 32pt on 300 dpi:
*font_name* *xheight*

and the manpage literally spells out the vibe check for you: [ that is, if base x height + ascenders + descenders = 133, how much is x height? ] 🧚 so yes, they really do want you to do the maths, no cap.

  • -D dir β€” the directory to write output files to. pick a folder, any folder, just make it a good one πŸ¦‹
  • -O FILE β€” (Output) the output unicharset that will be given to combine_tessdata(1). this is the glow-up version of your unicharset and she's going places ✨

✨ SEE ALSO ✨

go read these too, iykyk:

and the docs link, because of course:

https://tesseract-ocr.github.io/tessdoc/Training-Tesseract.html


✨ COPYING ✨

Copyright (C) Hewlett-Packard Company, 1988 β€” Licensed under the Apache License, Version 2.0. periodt. πŸ“œ


✨ AUTHOR ✨

The Tesseract OCR engine was written by Ray Smith and his research groups at Hewlett Packard (1985-1995) and Google (2006-2018). literal main character energy from both eras, we love a cross-decade icon πŸŒˆπŸ‘‘


okay that's the whole page, you're fully caught up πŸ’œ this was MFTRAINING(1), dated 2026-09-28 β€” that's the source/version and date right there in the footer, and now it's in a cute little sign-off instead of a boring bottom line. mwah, go train some features bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from