COMBINE_TESSDATA(1) | COMBINE_TESSDATA(1) |
combine_tessdata - combine/extract/overwrite/list/compact Tesseract data
combine_tessdata [OPTION] FILE...
combine_tessdata(1) is the main program to combine/extract/overwrite/list/compact tessdata components in [lang].traineddata files.
To combine all the individual tessdata components (unicharset, DAWGs, classifier templates, ambiguities, language configs) located at, say, /home/$USER/temp/eng.* run:
combine_tessdata /home/$USER/temp/eng.
The result will be a combined tessdata file /home/$USER/temp/eng.traineddata
Specify option -e if you would like to extract individual components from a combined traineddata file. For example, to extract 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 /home/$USER/temp/eng.unicharset
Specify option -o to overwrite individual components of the given [lang].traineddata file. 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.
Note: 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 (.unicharset for the unicharset, .unicharambigs for unichar ambigs, etc). See k*FileSuffix variable in ccutil/tessdatamanager.h.
Specify option -u to unpack 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.
-c .traineddata FILE...: Compacts the LSTM component in the .traineddata file to int.
-d .traineddata FILE...: Lists directory of components from the .traineddata file.
-e .traineddata FILE...: Extracts the specified components from the .traineddata file
-l .traineddata FILE...: List the network information.
-o .traineddata FILE...: Overwrites the specified components of the .traineddata file with those provided on the command line.
-u .traineddata PATHPREFIX Unpacks the .traineddata using the provided prefix.
Prefix refers to the full file prefix, including period (.)
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
lang.config
lang.unicharset
lang.unicharambigs
lang.inttemp
lang.pffmtable
lang.normproto
lang.punc-dawg
lang.word-dawg
lang.number-dawg
lang.freq-dawg
lang.fixed-length-dawgs
lang.shapetable
lang.bigram-dawg
lang.unambig-dawg
lang.params-model
lang.lstm
lang.lstm-punc-dawg
lang.lstm-word-dawg
lang.lstm-number-dawg
lang.lstm-unicharset
lang.lstm-recoder
lang.version
combine_tessdata(1) first appeared in version 3.00 of Tesseract
tesseract(1), wordlist2dawg(1), cntraining(1), mftraining(1), unicharset(5), unicharambigs(5)
Copyright (C) 2009, Google Inc. Licensed under the Apache License, Version 2.0
The Tesseract OCR engine was written by Ray Smith and his research groups at Hewlett Packard (1985-1995) and Google (2006-present).
01/11/2023 |