#include <stdio.h>
#include "unicharset.h"
Go to the source code of this file.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
This program reads in a text file consisting of feature samples from a training page in the following format:
FontName UTF8-char-str xmin ymin xmax ymax page-number
NumberOfFeatureTypes(N)
FeatureTypeName1 NumberOfFeatures(M)
Feature1
...
FeatureM
FeatureTypeName2 NumberOfFeatures(M)
Feature1
...
FeatureM
...
FeatureTypeNameN NumberOfFeatures(M)
Feature1
...
FeatureM
FontName CharName ...
The result of this program is a binary inttemp file used by the OCR engine.
- Parameters
-
argc | number of command line arguments |
argv | array of command line arguments |
- Returns
- none
- Note
- Exceptions: none
-
History: Fri Aug 18 08:56:17 1989, DSJ, Created.
-
History: Mon May 18 1998, Christy Russson, Revistion started.
Definition at line 23 of file merge_unicharsets.cpp.
26 printf(
"Usage: %s unicharset-in-1 ... unicharset-in-n unicharset-out\n",
31 UNICHARSET input_unicharset, result_unicharset;
32 for (
int arg = 1; arg < argc - 1; ++arg) {
35 printf(
"Loaded unicharset of size %d from file %s\n",
36 input_unicharset.
size(), argv[arg]);
39 printf(
"Failed to load unicharset from file %s!!\n", argv[arg]);
46 printf(
"Wrote unicharset file %s.\n", argv[argc - 1]);
48 printf(
"Cannot save unicharset file %s.\n", argv[argc - 1]);
void AppendOtherUnicharset(const UNICHARSET &src)
bool load_from_file(const char *const filename, bool skip_fragments)
bool save_to_file(const char *const filename) const