COMBINE_TESSDATA(1)
π
combine_tessdata, bestie (that's the COMBINE_TESSDATA(1) manual, and yes she's iconic)
okay so real talk β this is the COMBINE_TESSDATA(1) page and honestly? it's giving main character energy for anyone who's ever wrestled a Tesseract file. let's get into it π«Ά
β¨ NAME β¨
combine_tessdata β combine/extract/overwrite/list/compact Tesseract data
like, she does everything to your tessdata, no cap π
β¨ SYNOPSIS β¨
combine_tessdata [OPTION] FILE...
πΈ DESCRIPTION πΈ
combine_tessdata(1) is the main program to combine/extract/overwrite/list/compact tessdata components in [lang].traineddata files. she's the momager of tessdata files, periodt.
so say you've got all your individual tessdata components (unicharset, DAWGs, classifier templates, ambiguities, language configs) sitting in, like, /home/$USER/temp/eng.* β you just run:
combine_tessdata /home/$USER/temp/eng.
and boom π₯ the result will be a combined tessdata file:
/home/$USER/temp/eng.traineddata
gorgeous. no notes.
now. if you want to extract individual components out of a combined traineddata file, you specify option -e. literally so easy. for example, to extract the language config file and the unicharset from tessdata/eng.traineddata, run:
combine_tessdata -e tessdata/eng.traineddata \
/home/$USER/temp/eng.config /home/$USER/temp/eng.unicharset
the desired config file and unicharset will be written to /home/$USER/temp/eng.config and /home/$USER/temp/eng.unicharset β¨
want to overwrite individual components of the given [lang].traineddata file? specify option -o, bestie. for example, to overwrite language config and unichar ambiguities files in tessdata/eng.traineddata, use:
combine_tessdata -o tessdata/eng.traineddata \
/home/$USER/temp/eng.config /home/$USER/temp/eng.unicharambigs
as a result, tessdata/eng.traineddata will contain the new language config and unichar ambigs, plus all the original DAWGs, classifier templates, etc. she keeps her whole personality and just gets a little upgrade π
β οΈ note (and this one's important, don't skip her): the file names of the files to extract to and to overwrite from should have the appropriate file suffixes (extensions) indicating their tessdata component type (.unicharsetfor the unicharset,.unicharambigsfor unichar ambigs, etc). seek*FileSuffixvariable inccutil/tessdatamanager.h.
and if you specify option -u, she unpacks all the components to the specified path:
combine_tessdata -u tessdata/eng.traineddata /home/$USER/temp/eng.
this will create /home/$USER/temp/eng.* files with individual tessdata components from tessdata/eng.traineddata. iykyk π¦
π₯ OPTIONS π₯
-c.traineddataFILE...β compacts the LSTM component in the.traineddatafile to int. tiny queen, smaller file π-d.traineddataFILE...β lists directory of components from the.traineddatafile. a little tour of what's inside π-e.traineddataFILE...β extracts the specified components from the.traineddatafile. free her children π-l.traineddataFILE...β list the network information. the tea on the neural net β-o.traineddataFILE...β overwrites the specified components of the.traineddatafile with those provided on the command line. glow-up time β¨-u.traineddataPATHPREFIXβ unpacks the.traineddatausing the provided prefix. everything out in the open π
π CAVEATS π
prefix refers to the full file prefix, including period (.)
like, the . is not optional, she is part of the name, respect her or she will not work. don't embarrass yourself fr fr π
π§ COMPONENTS π§
the components in a Tesseract lang.traineddata file as of Tesseract 4.0 are briefly described below; for more information on many of these files, see https://tesseract-ocr.github.io/tessdoc/Training-Tesseract.html and https://tesseract-ocr.github.io/tessdoc/TrainingTesseract-4.00.html
okay lineup time, going down the list one by one β
lang.configβ (Optional) language-specific overrides to default config variables. for 4.0 traineddata files,lang.configprovides control parameters which can affect layout analysis, and sub-languages. she's the vibe-setter πlang.unicharsetβ (Required - 3.0x legacy tesseract) the list of symbols that Tesseract recognizes, with properties. seeunicharset(5). required, so likeβ¦ don't forget her πlang.unicharambigsβ (Optional - 3.0x legacy tesseract) this file contains information on pairs of recognized symbols which are often confused. for example,rnandm. relatable honestly πlang.inttempβ (Required - 3.0x legacy tesseract) character shape templates for each unichar. produced bymftraining(1). the original fit check πlang.pffmtableβ (Required - 3.0x legacy tesseract) the number of features expected for each unichar. produced bymftraining(1)from.trfiles.lang.normprotoβ (Required - 3.0x legacy tesseract) character normalization prototypes generated bycntraining(1)from.trfiles.lang.punc-dawgβ (Optional - 3.0x legacy tesseract) a dawg made from punctuation patterns found around words. the "word" part is replaced by a single space. (yes she is literally a dawg, we love her) πΆlang.word-dawgβ (Optional - 3.0x legacy tesseract) a dawg made from dictionary words from the language.lang.number-dawgβ (Optional - 3.0x legacy tesseract) a dawg made from tokens which originally contained digits. each digit is replaced by a space character.lang.freq-dawgβ (Optional - 3.0x legacy tesseract) a dawg made from the most frequent words which would have gone intoword-dawg. the popular girls only πlang.fixed-length-dawgsβ (Optional - 3.0x legacy tesseract) several dawgs of different fixed lengths β useful for languages like Chinese.lang.shapetableβ (Optional - 3.0x legacy tesseract) when present, a shapetable is an extra layer between the character classifier and the word recognizer that allows the character classifier to return a collection of unichar ids and fonts instead of a single unichar-id and font. extra layer = extra slay πΈlang.bigram-dawgβ (Optional - 3.0x legacy tesseract) a dawg of word bigrams where the words are separated by a space and each digit is replaced by a?.lang.unambig-dawgβ (Optional - 3.0x legacy tesseract).(yes that's all the original says, she's mysterious π€«)lang.params-modelβ (Optional - 3.0x legacy tesseract).(again, mysterious, we respect it)lang.lstmβ (Required - 4.0 LSTM) neural net trained recognition model generated bylstmtraining. the actual brain cell π₯lang.lstm-punc-dawgβ (Optional - 4.0 LSTM) a dawg made from punctuation patterns found around words. the "word" part is replaced by a single space. useslang.lstm-unicharset.lang.lstm-word-dawgβ (Optional - 4.0 LSTM) a dawg made from dictionary words from the language. useslang.lstm-unicharset.lang.lstm-number-dawgβ (Optional - 4.0 LSTM) a dawg made from tokens which originally contained digits. each digit is replaced by a space character. useslang.lstm-unicharset.lang.lstm-unicharsetβ (Required - 4.0 LSTM) the unicode character set that Tesseract recognizes, with properties. same unicharset must be used to train the LSTM and build thelstm-*-dawgsfiles. matching sets or it's a no π«Άlang.lstm-recoderβ (Required - 4.0 LSTM)Unicharcompress, aka the recoder, which maps the unicharset further to the codes actually used by the neural network recognizer. this is created as part of the starter traineddata bycombine_lang_model. she's the translator bestie πlang.versionβ (Optional) version string for the traineddata file. first appeared in version 4.0 of Tesseract. old version of traineddata files will reportVersion:Pre-4.0.0. 4.0 version of traineddata files may include the network spec used for LSTM training as part of version string. the receipts π§Ύ
π HISTORY π
combine_tessdata(1) first appeared in version 3.00 of Tesseract. a legacy icon, we stan β
π SEE ALSO π
tesseract(1), wordlist2dawg(1), cntraining(1), mftraining(1), unicharset(5), unicharambigs(5)
the whole friend group, go say hi π
π COPYING π
copyright (C) 2009, Google Inc. licensed under the Apache License, Version 2.0. legal queen, respect the license π
π AUTHOR π
the Tesseract OCR engine was written by Ray Smith and his research groups at Hewlett Packard (1985-1995) and Google (2006-2018). absolute legends, no cap π
and that's the whole page bestie π
this was the COMBINE_TESSDATA(1) manual, dated 2026-09-28 β go forth and combine/extract/overwrite/list/compact responsibly, mwah π«Άβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: tesseract-ocr 5.5.3-bp160.2.1 Β· Apache-2.0 AND GPL-2.0-or-later
- opensuse-leap 16.0: tesseract-ocr 5.5.3-bp160.2.1 Β· Apache-2.0 AND GPL-2.0-or-later
- opensuse-leap 16.0: tesseract-ocr 5.5.3-bp160.2.1 Β· Apache-2.0 AND GPL-2.0-or-later
- opensuse-leap 16.0: tesseract-ocr 5.5.3-bp160.2.1 Β· Apache-2.0 AND GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms