#include "base/commandlineflags.h"
#include "commontraining.h"
#include "mastertrainer.h"
#include "params.h"
#include "strngs.h"
Go to the source code of this file.
|
| INT_PARAM_FLAG (display_cloud_font,-1,"Display cloud of this font, canonical_class1") |
|
| INT_PARAM_FLAG (display_canonical_font,-1,"Display canonical sample of this font, canonical_class2") |
|
| STRING_PARAM_FLAG (canonical_class1,"","Class to show ambigs for") |
|
| STRING_PARAM_FLAG (canonical_class2,"","Class to show ambigs for") |
|
int | main (int argc, char **argv) |
|
INT_PARAM_FLAG |
( |
display_cloud_font |
, |
|
|
- |
1, |
|
|
"Display cloud of this |
font, |
|
|
canonical_class1" |
|
|
) |
| |
INT_PARAM_FLAG |
( |
display_canonical_font |
, |
|
|
- |
1, |
|
|
"Display canonical sample of this |
font, |
|
|
canonical_class2" |
|
|
) |
| |
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 47 of file shapeclustering.cpp.
52 argc, argv,
false,
NULL, &file_prefix);
57 if (FLAGS_display_cloud_font >= 0) {
58 #ifndef GRAPHICS_DISABLED
60 FLAGS_display_cloud_font,
61 FLAGS_canonical_class2.c_str(),
62 FLAGS_display_canonical_font);
63 #endif // GRAPHICS_DISABLED
65 }
else if (!FLAGS_canonical_class1.empty()) {
67 FLAGS_canonical_class2.c_str());
void DisplaySamples(const char *unichar_str1, int cloud_font, const char *unichar_str2, int canonical_font)
void ParseArguments(int *argc, char ***argv)
const ShapeTable & master_shapes() const
MasterTrainer * LoadTrainingData(int argc, const char *const *argv, bool replication, ShapeTable **shape_table, STRING *file_prefix)
void DebugCanonical(const char *unichar_str1, const char *unichar_str2)
void WriteShapeTable(const STRING &file_prefix, const ShapeTable &shape_table)
STRING_PARAM_FLAG |
( |
canonical_class1 |
, |
|
|
"" |
, |
|
|
"Class to show ambigs for" |
|
|
) |
| |
STRING_PARAM_FLAG |
( |
canonical_class2 |
, |
|
|
"" |
, |
|
|
"Class to show ambigs for" |
|
|
) |
| |