Skip to content

Commit

Permalink
ccstruct: Fix typos in comments and strings
Browse files Browse the repository at this point in the history
Most of them were found by codespell.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Sep 14, 2015
1 parent 318b88d commit bef8cad
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ccstruct/blobbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/boxread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/normalis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/normalis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/pdblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions ccstruct/rejctmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ccstruct/statistc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down Expand Up @@ -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++);
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/vecfuncs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
/*----------------------------------------------------------------------
Expand Down

0 comments on commit bef8cad

Please sign in to comment.