#include <stdio.h>
#include "base/commandlineflags.h"
#include "baseapi.h"
#include "commontraining.h"
#include "cubeclassifier.h"
#include "mastertrainer.h"
#include "params.h"
#include "strngs.h"
#include "tessclassifier.h"
Go to the source code of this file.
|
const char * | names [] = {"pruner", "full", "cube", "cubetess", NULL } |
|
DECLARE_INT_PARAM_FLAG |
( |
debug_level |
| ) |
|
DECLARE_STRING_PARAM_FLAG |
( |
T |
| ) |
|
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 132 of file classifier_tester.cpp.
136 argc, argv,
false,
NULL, &file_prefix);
140 FLAGS_classifier.c_str(), trainer->
unicharset(), argc, argv, &
api);
141 if (shape_classifier ==
NULL) {
142 fprintf(stderr,
"Classifier init failed!:%s\n", FLAGS_classifier.c_str());
152 MAX(3, FLAGS_debug_level),
false,
153 shape_classifier,
NULL);
154 delete shape_classifier;
void ReplicateAndRandomizeSamplesIfRequired()
void ParseArguments(int *argc, char ***argv)
const UNICHARSET & unicharset() const
void TestClassifierOnSamples(CountTypes error_mode, int report_level, bool replicate_samples, ShapeClassifier *test_classifier, STRING *report_string)
MasterTrainer * LoadTrainingData(int argc, const char *const *argv, bool replication, ShapeTable **shape_table, STRING *file_prefix)
STRING_PARAM_FLAG |
( |
classifier |
, |
|
|
"" |
, |
|
|
"Classifier to test" |
|
|
) |
| |
STRING_PARAM_FLAG |
( |
lang |
, |
|
|
"eng" |
, |
|
|
"Language to test" |
|
|
) |
| |
STRING_PARAM_FLAG |
( |
tessdata_dir |
, |
|
|
"" |
, |
|
|
"Directory of traineddata files" |
|
|
) |
| |
const char* names[] = {"pruner", "full", "cube", "cubetess", NULL } |