mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
Fix more typos in code comments and variable name
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
9f8e07cdf9
commit
7fd6d2388a
@ -35,13 +35,13 @@ enum ClassifierName { CN_PRUNER, CN_FULL, CN_COUNT };
|
||||
|
||||
static const char *names[] = {"pruner", "full"};
|
||||
|
||||
static tesseract::ShapeClassifier *InitializeClassifier(const char *classifer_name,
|
||||
static tesseract::ShapeClassifier *InitializeClassifier(const char *classifier_name,
|
||||
const UNICHARSET &unicharset, int argc,
|
||||
char **argv, tesseract::TessBaseAPI **api) {
|
||||
// Decode the classifier string.
|
||||
ClassifierName classifier = CN_COUNT;
|
||||
for (int c = 0; c < CN_COUNT; ++c) {
|
||||
if (strcmp(classifer_name, names[c]) == 0) {
|
||||
if (strcmp(classifier_name, names[c]) == 0) {
|
||||
classifier = static_cast<ClassifierName>(c);
|
||||
break;
|
||||
}
|
||||
@ -75,7 +75,7 @@ static tesseract::ShapeClassifier *InitializeClassifier(const char *classifer_na
|
||||
} else if (classifier == CN_FULL) {
|
||||
shape_classifier = new tesseract::TessClassifier(false, classify);
|
||||
}
|
||||
tprintf("Testing classifier %s:\n", classifer_name);
|
||||
tprintf("Testing classifier %s:\n", classifier_name);
|
||||
return shape_classifier;
|
||||
}
|
||||
|
||||
|
@ -55,13 +55,13 @@ struct AssociateStats {
|
||||
|
||||
float shape_cost; // cost of blob shape
|
||||
bool bad_shape; // true if the shape of the blob is unacceptable
|
||||
float full_wh_ratio; // width-to-hight ratio + gap on the right
|
||||
float full_wh_ratio_total; // sum of width-to-hight ratios
|
||||
float full_wh_ratio; // width-to-height ratio + gap on the right
|
||||
float full_wh_ratio_total; // sum of width-to-height ratios
|
||||
// on the path terminating at this blob
|
||||
float full_wh_ratio_var; // variance of full_wh_ratios on the path
|
||||
bool bad_fixed_pitch_right_gap; // true if there is no gap before
|
||||
// the blob on the right
|
||||
bool bad_fixed_pitch_wh_ratio; // true if the blobs has width-to-hight
|
||||
bool bad_fixed_pitch_wh_ratio; // true if the blobs has width-to-height
|
||||
// ratio > kMaxFixedPitchCharAspectRatio
|
||||
int gap_sum; // sum of gaps within the blob
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user