From bef8cad38d377966697f2d2380c1dd927b33376f Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 14 Sep 2015 22:02:00 +0200 Subject: [PATCH] ccstruct: Fix typos in comments and strings Most of them were found by codespell. Signed-off-by: Stefan Weil --- ccstruct/blobbox.cpp | 2 +- ccstruct/boxread.cpp | 2 +- ccstruct/normalis.cpp | 2 +- ccstruct/normalis.h | 2 +- ccstruct/pdblock.h | 2 +- ccstruct/rejctmap.h | 8 ++++---- ccstruct/statistc.cpp | 6 +++--- ccstruct/vecfuncs.cpp | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ccstruct/blobbox.cpp b/ccstruct/blobbox.cpp index 322171f0dc..280096b5d3 100644 --- a/ccstruct/blobbox.cpp +++ b/ccstruct/blobbox.cpp @@ -33,7 +33,7 @@ ELISTIZE (BLOBNBOX) ELIST2IZE (TO_ROW) ELISTIZE (TO_BLOCK) -// Upto 30 degrees is allowed for rotations of diacritic blobs. +// Up to 30 degrees is allowed for rotations of diacritic blobs. const double kCosSmallAngle = 0.866; // Min aspect ratio for a joined word to indicate an obvious flow direction. const double kDefiniteAspectRatio = 2.0; diff --git a/ccstruct/boxread.cpp b/ccstruct/boxread.cpp index 947fcc02fe..f4aedca5b3 100644 --- a/ccstruct/boxread.cpp +++ b/ccstruct/boxread.cpp @@ -35,7 +35,7 @@ FILE* OpenBoxFile(const STRING& fname) { FILE* box_file = NULL; if (!(box_file = fopen(filename.string(), "rb"))) { CANTOPENFILE.error("read_next_box", TESSEXIT, - "Cant open box file %s", + "Can't open box file %s", filename.string()); } return box_file; diff --git a/ccstruct/normalis.cpp b/ccstruct/normalis.cpp index d43a1459cb..ddf6dbf3b1 100644 --- a/ccstruct/normalis.cpp +++ b/ccstruct/normalis.cpp @@ -382,7 +382,7 @@ void DENORM::LocalDenormTransform(const FCOORD& pt, FCOORD* original) const { } // Transforms the given coords all the way back to source image space using -// the full transformation sequence defined by this and its predecesors +// the full transformation sequence defined by this and its predecessors // recursively, shallowest first, and finally any block re_rotation. // If last_denorm is not NULL, then the last transformation used will // be last_denorm, and the block re_rotation will never be executed. diff --git a/ccstruct/normalis.h b/ccstruct/normalis.h index c8ce7cd28b..2d75412078 100644 --- a/ccstruct/normalis.h +++ b/ccstruct/normalis.h @@ -218,7 +218,7 @@ class DENORM { void LocalDenormTransform(const TPOINT& pt, TPOINT* original) const; void LocalDenormTransform(const FCOORD& pt, FCOORD* original) const; // Transforms the given coords all the way back to source image space using - // the full transformation sequence defined by this and its predecesors + // the full transformation sequence defined by this and its predecessors // recursively, shallowest first, and finally any block re_rotation. // If last_denorm is not NULL, then the last transformation used will // be last_denorm, and the block re_rotation will never be executed. diff --git a/ccstruct/pdblock.h b/ccstruct/pdblock.h index 0dd0bf2ef8..b64eff36d0 100644 --- a/ccstruct/pdblock.h +++ b/ccstruct/pdblock.h @@ -108,7 +108,7 @@ class PDBLK PDBLK & operator= (const PDBLK & source); protected: - POLY_BLOCK *hand_poly; //< wierd as well + POLY_BLOCK *hand_poly; //< weird as well ICOORDELT_LIST leftside; //< left side vertices ICOORDELT_LIST rightside; //< right side vertices TBOX box; //< bounding box diff --git a/ccstruct/rejctmap.h b/ccstruct/rejctmap.h index 4b27bab49b..d945dda1fa 100644 --- a/ccstruct/rejctmap.h +++ b/ccstruct/rejctmap.h @@ -16,7 +16,7 @@ ** limitations under the License. * -This module may look unneccessarily verbose, but here's the philosophy... +This module may look unnecessarily verbose, but here's the philosophy... ALL processing of the reject map is done in this module. There are lots of separate calls to set reject/accept flags. These have DELIBERATELY been kept @@ -51,7 +51,7 @@ OF THIS IMPLIED TEMPORAL ORDERING OF THE FLAGS!!!! enum REJ_FLAGS { /* Reject modes which are NEVER overridden */ - R_TESS_FAILURE, // PERM Tess didnt classify + R_TESS_FAILURE, // PERM Tess didn't classify R_SMALL_XHT, // PERM Xht too small R_EDGE_CHAR, // PERM Too close to edge of image R_1IL_CONFLICT, // PERM 1Il confusion @@ -62,7 +62,7 @@ enum REJ_FLAGS /* Initial reject modes (pre NN_ACCEPT) */ R_POOR_MATCH, // TEMP Ray's original heuristic (Not used) - R_NOT_TESS_ACCEPTED, // TEMP Tess didnt accept WERD + R_NOT_TESS_ACCEPTED, // TEMP Tess didn't accept WERD R_CONTAINS_BLANKS, // TEMP Tess failed on other chs in WERD R_BAD_PERMUTER, // POTENTIAL Bad permuter for WERD @@ -82,7 +82,7 @@ enum REJ_FLAGS R_ROW_REJ, // TEMP Row rejection R_UNLV_REJ, // TEMP ~ turned to - or ^ turned to space - /* Accept modes which occur inbetween the above rejection groups */ + /* Accept modes which occur between the above rejection groups */ R_NN_ACCEPT, //NN acceptance R_HYPHEN_ACCEPT, //Hyphen acceptance R_MM_ACCEPT, //Matrix match acceptance diff --git a/ccstruct/statistc.cpp b/ccstruct/statistc.cpp index 63676c2fca..39d5edd180 100644 --- a/ccstruct/statistc.cpp +++ b/ccstruct/statistc.cpp @@ -204,7 +204,7 @@ double STATS::ile(double frac) const { /********************************************************************** * STATS::min_bucket * - * Find REAL minimum bucket - ile(0.0) isnt necessarily correct + * Find REAL minimum bucket - ile(0.0) isn't necessarily correct **********************************************************************/ inT32 STATS::min_bucket() const { // Find min if (buckets_ == NULL || total_count_ == 0) { @@ -219,7 +219,7 @@ inT32 STATS::min_bucket() const { // Find min /********************************************************************** * STATS::max_bucket * - * Find REAL maximum bucket - ile(1.0) isnt necessarily correct + * Find REAL maximum bucket - ile(1.0) isn't necessarily correct **********************************************************************/ inT32 STATS::max_bucket() const { // Find max @@ -249,7 +249,7 @@ double STATS::median() const { //get median if ((total_count_ > 1) && (pile_count(median_pile) == 0)) { inT32 min_pile; inT32 max_pile; - /* Find preceeding non zero pile */ + /* Find preceding non zero pile */ for (min_pile = median_pile; pile_count(min_pile) == 0; min_pile--); /* Find following non zero pile */ for (max_pile = median_pile; pile_count(max_pile) == 0; max_pile++); diff --git a/ccstruct/vecfuncs.cpp b/ccstruct/vecfuncs.cpp index 8357c9aabe..bafca55d60 100644 --- a/ccstruct/vecfuncs.cpp +++ b/ccstruct/vecfuncs.cpp @@ -23,7 +23,7 @@ * ******************************************************************************** * Revision 5.1 89/07/27 11:47:50 11:47:50 ray () - * Added ratings acces methods. + * Added ratings access methods. * This version ready for independent development. */ /*----------------------------------------------------------------------