Skip to content

Commit

Permalink
Fix more typos in code comments and variable name
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Oct 31, 2024
1 parent 9f8e07c commit 7fd6d23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/training/classifier_tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down
6 changes: 3 additions & 3 deletions src/wordrec/associate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit 7fd6d23

Please sign in to comment.