mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-07 09:52:40 +08:00
ccstruct: Fix typos in comments and strings
Most of them were found by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
d7a96db827
commit
fbc07c0f1b
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
ELISTIZE (BLOBNBOX) ELIST2IZE (TO_ROW) ELISTIZE (TO_BLOCK)
|
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;
|
const double kCosSmallAngle = 0.866;
|
||||||
// Min aspect ratio for a joined word to indicate an obvious flow direction.
|
// Min aspect ratio for a joined word to indicate an obvious flow direction.
|
||||||
const double kDefiniteAspectRatio = 2.0;
|
const double kDefiniteAspectRatio = 2.0;
|
||||||
|
@ -35,7 +35,7 @@ FILE* OpenBoxFile(const STRING& fname) {
|
|||||||
FILE* box_file = NULL;
|
FILE* box_file = NULL;
|
||||||
if (!(box_file = fopen(filename.string(), "rb"))) {
|
if (!(box_file = fopen(filename.string(), "rb"))) {
|
||||||
CANTOPENFILE.error("read_next_box", TESSEXIT,
|
CANTOPENFILE.error("read_next_box", TESSEXIT,
|
||||||
"Cant open box file %s",
|
"Can't open box file %s",
|
||||||
filename.string());
|
filename.string());
|
||||||
}
|
}
|
||||||
return box_file;
|
return box_file;
|
||||||
|
@ -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
|
// 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.
|
// recursively, shallowest first, and finally any block re_rotation.
|
||||||
// If last_denorm is not NULL, then the last transformation used will
|
// If last_denorm is not NULL, then the last transformation used will
|
||||||
// be last_denorm, and the block re_rotation will never be executed.
|
// be last_denorm, and the block re_rotation will never be executed.
|
||||||
|
@ -218,7 +218,7 @@ class DENORM {
|
|||||||
void LocalDenormTransform(const TPOINT& pt, TPOINT* original) const;
|
void LocalDenormTransform(const TPOINT& pt, TPOINT* original) const;
|
||||||
void LocalDenormTransform(const FCOORD& pt, FCOORD* original) const;
|
void LocalDenormTransform(const FCOORD& pt, FCOORD* original) const;
|
||||||
// Transforms the given coords all the way back to source image space using
|
// 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.
|
// recursively, shallowest first, and finally any block re_rotation.
|
||||||
// If last_denorm is not NULL, then the last transformation used will
|
// If last_denorm is not NULL, then the last transformation used will
|
||||||
// be last_denorm, and the block re_rotation will never be executed.
|
// be last_denorm, and the block re_rotation will never be executed.
|
||||||
|
@ -108,7 +108,7 @@ class PDBLK
|
|||||||
PDBLK & operator= (const PDBLK & source);
|
PDBLK & operator= (const PDBLK & source);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
POLY_BLOCK *hand_poly; //< wierd as well
|
POLY_BLOCK *hand_poly; //< weird as well
|
||||||
ICOORDELT_LIST leftside; //< left side vertices
|
ICOORDELT_LIST leftside; //< left side vertices
|
||||||
ICOORDELT_LIST rightside; //< right side vertices
|
ICOORDELT_LIST rightside; //< right side vertices
|
||||||
TBOX box; //< bounding box
|
TBOX box; //< bounding box
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
** limitations under the License.
|
** 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
|
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
|
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
|
enum REJ_FLAGS
|
||||||
{
|
{
|
||||||
/* Reject modes which are NEVER overridden */
|
/* 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_SMALL_XHT, // PERM Xht too small
|
||||||
R_EDGE_CHAR, // PERM Too close to edge of image
|
R_EDGE_CHAR, // PERM Too close to edge of image
|
||||||
R_1IL_CONFLICT, // PERM 1Il confusion
|
R_1IL_CONFLICT, // PERM 1Il confusion
|
||||||
@ -62,7 +62,7 @@ enum REJ_FLAGS
|
|||||||
|
|
||||||
/* Initial reject modes (pre NN_ACCEPT) */
|
/* Initial reject modes (pre NN_ACCEPT) */
|
||||||
R_POOR_MATCH, // TEMP Ray's original heuristic (Not used)
|
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_CONTAINS_BLANKS, // TEMP Tess failed on other chs in WERD
|
||||||
R_BAD_PERMUTER, // POTENTIAL Bad permuter for WERD
|
R_BAD_PERMUTER, // POTENTIAL Bad permuter for WERD
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ enum REJ_FLAGS
|
|||||||
R_ROW_REJ, // TEMP Row rejection
|
R_ROW_REJ, // TEMP Row rejection
|
||||||
R_UNLV_REJ, // TEMP ~ turned to - or ^ turned to space
|
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_NN_ACCEPT, //NN acceptance
|
||||||
R_HYPHEN_ACCEPT, //Hyphen acceptance
|
R_HYPHEN_ACCEPT, //Hyphen acceptance
|
||||||
R_MM_ACCEPT, //Matrix match acceptance
|
R_MM_ACCEPT, //Matrix match acceptance
|
||||||
|
@ -204,7 +204,7 @@ double STATS::ile(double frac) const {
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* STATS::min_bucket
|
* 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
|
inT32 STATS::min_bucket() const { // Find min
|
||||||
if (buckets_ == NULL || total_count_ == 0) {
|
if (buckets_ == NULL || total_count_ == 0) {
|
||||||
@ -219,7 +219,7 @@ inT32 STATS::min_bucket() const { // Find min
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* STATS::max_bucket
|
* 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
|
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)) {
|
if ((total_count_ > 1) && (pile_count(median_pile) == 0)) {
|
||||||
inT32 min_pile;
|
inT32 min_pile;
|
||||||
inT32 max_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--);
|
for (min_pile = median_pile; pile_count(min_pile) == 0; min_pile--);
|
||||||
/* Find following non zero pile */
|
/* Find following non zero pile */
|
||||||
for (max_pile = median_pile; pile_count(max_pile) == 0; max_pile++);
|
for (max_pile = median_pile; pile_count(max_pile) == 0; max_pile++);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*
|
*
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* Revision 5.1 89/07/27 11:47:50 11:47:50 ray ()
|
* 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.
|
* This version ready for independent development.
|
||||||
*/
|
*/
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user