Skip to content

Commit bef8cad

Browse files
committed
ccstruct: Fix typos in comments and strings
Most of them were found by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent 318b88d commit bef8cad

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

ccstruct/blobbox.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
ELISTIZE (BLOBNBOX) ELIST2IZE (TO_ROW) ELISTIZE (TO_BLOCK)
3535

36-
// Upto 30 degrees is allowed for rotations of diacritic blobs.
36+
// Up to 30 degrees is allowed for rotations of diacritic blobs.
3737
const double kCosSmallAngle = 0.866;
3838
// Min aspect ratio for a joined word to indicate an obvious flow direction.
3939
const double kDefiniteAspectRatio = 2.0;

ccstruct/boxread.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ FILE* OpenBoxFile(const STRING& fname) {
3535
FILE* box_file = NULL;
3636
if (!(box_file = fopen(filename.string(), "rb"))) {
3737
CANTOPENFILE.error("read_next_box", TESSEXIT,
38-
"Cant open box file %s",
38+
"Can't open box file %s",
3939
filename.string());
4040
}
4141
return box_file;

ccstruct/normalis.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ void DENORM::LocalDenormTransform(const FCOORD& pt, FCOORD* original) const {
382382
}
383383

384384
// Transforms the given coords all the way back to source image space using
385-
// the full transformation sequence defined by this and its predecesors
385+
// the full transformation sequence defined by this and its predecessors
386386
// recursively, shallowest first, and finally any block re_rotation.
387387
// If last_denorm is not NULL, then the last transformation used will
388388
// be last_denorm, and the block re_rotation will never be executed.

ccstruct/normalis.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class DENORM {
218218
void LocalDenormTransform(const TPOINT& pt, TPOINT* original) const;
219219
void LocalDenormTransform(const FCOORD& pt, FCOORD* original) const;
220220
// Transforms the given coords all the way back to source image space using
221-
// the full transformation sequence defined by this and its predecesors
221+
// the full transformation sequence defined by this and its predecessors
222222
// recursively, shallowest first, and finally any block re_rotation.
223223
// If last_denorm is not NULL, then the last transformation used will
224224
// be last_denorm, and the block re_rotation will never be executed.

ccstruct/pdblock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class PDBLK
108108
PDBLK & operator= (const PDBLK & source);
109109

110110
protected:
111-
POLY_BLOCK *hand_poly; //< wierd as well
111+
POLY_BLOCK *hand_poly; //< weird as well
112112
ICOORDELT_LIST leftside; //< left side vertices
113113
ICOORDELT_LIST rightside; //< right side vertices
114114
TBOX box; //< bounding box

ccstruct/rejctmap.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
** limitations under the License.
1717
*
1818
19-
This module may look unneccessarily verbose, but here's the philosophy...
19+
This module may look unnecessarily verbose, but here's the philosophy...
2020
2121
ALL processing of the reject map is done in this module. There are lots of
2222
separate calls to set reject/accept flags. These have DELIBERATELY been kept
@@ -51,7 +51,7 @@ OF THIS IMPLIED TEMPORAL ORDERING OF THE FLAGS!!!!
5151
enum REJ_FLAGS
5252
{
5353
/* Reject modes which are NEVER overridden */
54-
R_TESS_FAILURE, // PERM Tess didnt classify
54+
R_TESS_FAILURE, // PERM Tess didn't classify
5555
R_SMALL_XHT, // PERM Xht too small
5656
R_EDGE_CHAR, // PERM Too close to edge of image
5757
R_1IL_CONFLICT, // PERM 1Il confusion
@@ -62,7 +62,7 @@ enum REJ_FLAGS
6262

6363
/* Initial reject modes (pre NN_ACCEPT) */
6464
R_POOR_MATCH, // TEMP Ray's original heuristic (Not used)
65-
R_NOT_TESS_ACCEPTED, // TEMP Tess didnt accept WERD
65+
R_NOT_TESS_ACCEPTED, // TEMP Tess didn't accept WERD
6666
R_CONTAINS_BLANKS, // TEMP Tess failed on other chs in WERD
6767
R_BAD_PERMUTER, // POTENTIAL Bad permuter for WERD
6868

@@ -82,7 +82,7 @@ enum REJ_FLAGS
8282
R_ROW_REJ, // TEMP Row rejection
8383
R_UNLV_REJ, // TEMP ~ turned to - or ^ turned to space
8484

85-
/* Accept modes which occur inbetween the above rejection groups */
85+
/* Accept modes which occur between the above rejection groups */
8686
R_NN_ACCEPT, //NN acceptance
8787
R_HYPHEN_ACCEPT, //Hyphen acceptance
8888
R_MM_ACCEPT, //Matrix match acceptance

ccstruct/statistc.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ double STATS::ile(double frac) const {
204204
/**********************************************************************
205205
* STATS::min_bucket
206206
*
207-
* Find REAL minimum bucket - ile(0.0) isnt necessarily correct
207+
* Find REAL minimum bucket - ile(0.0) isn't necessarily correct
208208
**********************************************************************/
209209
inT32 STATS::min_bucket() const { // Find min
210210
if (buckets_ == NULL || total_count_ == 0) {
@@ -219,7 +219,7 @@ inT32 STATS::min_bucket() const { // Find min
219219
/**********************************************************************
220220
* STATS::max_bucket
221221
*
222-
* Find REAL maximum bucket - ile(1.0) isnt necessarily correct
222+
* Find REAL maximum bucket - ile(1.0) isn't necessarily correct
223223
**********************************************************************/
224224

225225
inT32 STATS::max_bucket() const { // Find max
@@ -249,7 +249,7 @@ double STATS::median() const { //get median
249249
if ((total_count_ > 1) && (pile_count(median_pile) == 0)) {
250250
inT32 min_pile;
251251
inT32 max_pile;
252-
/* Find preceeding non zero pile */
252+
/* Find preceding non zero pile */
253253
for (min_pile = median_pile; pile_count(min_pile) == 0; min_pile--);
254254
/* Find following non zero pile */
255255
for (max_pile = median_pile; pile_count(max_pile) == 0; max_pile++);

ccstruct/vecfuncs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
********************************************************************************
2525
* Revision 5.1 89/07/27 11:47:50 11:47:50 ray ()
26-
* Added ratings acces methods.
26+
* Added ratings access methods.
2727
* This version ready for independent development.
2828
*/
2929
/*----------------------------------------------------------------------

0 commit comments

Comments
 (0)