mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
Fix more typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
2591396e64
commit
38f3db8ca5
@ -29,7 +29,7 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
TBOX::TBOX( //construtor
|
||||
TBOX::TBOX( //constructor
|
||||
const ICOORD pt1, //one corner
|
||||
const ICOORD pt2 //the other corner
|
||||
) {
|
||||
|
@ -307,7 +307,7 @@ class DLLSYM TBOX { // bounding box
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
inline TBOX::TBOX( // construtor
|
||||
inline TBOX::TBOX( // constructor
|
||||
const FCOORD pt // floating centre
|
||||
) {
|
||||
bot_left = ICOORD ((inT16) floor (pt.x ()), (inT16) floor (pt.y ()));
|
||||
|
@ -331,7 +331,7 @@ class GenericVector {
|
||||
void init(int size);
|
||||
|
||||
// We are assuming that the object generally placed in thie
|
||||
// vector are small enough that for efficiency it makes sence
|
||||
// vector are small enough that for efficiency it makes sense
|
||||
// to start with a larger initial size.
|
||||
static const int kDefaultVectorSize = 4;
|
||||
inT32 size_used_;
|
||||
|
@ -219,7 +219,7 @@ class UNICHARSET {
|
||||
|
||||
// Return the UTF8 representation corresponding to the given UNICHAR_ID after
|
||||
// resolving any private encodings internal to Tesseract. This method is
|
||||
// preferrable to id_to_unichar for outputting text that will be visible to
|
||||
// preferable to id_to_unichar for outputting text that will be visible to
|
||||
// external applications.
|
||||
const char* const id_to_unichar_ext(UNICHAR_ID id) const;
|
||||
|
||||
|
@ -81,7 +81,7 @@ class CharSamp : public Bmp8 {
|
||||
label32_ = NULL;
|
||||
}
|
||||
if (label32 != NULL) {
|
||||
// remove any byte order markes if any
|
||||
// remove any byte order marks if any
|
||||
if (label32[0] == 0xfeff) {
|
||||
label32++;
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ BLOBNBOX* AlignedBlob::FindAlignedBlob(const AlignedBlobParams& p,
|
||||
}
|
||||
if ((p.right_tab && neighbour->leader_on_right()) ||
|
||||
(!p.right_tab && neighbour->leader_on_left()))
|
||||
continue; // Neigbours of leaders are not allowed to be used.
|
||||
continue; // Neighbours of leaders are not allowed to be used.
|
||||
if (n_x <= x_at_n_y + p.r_align_tolerance &&
|
||||
n_x >= x_at_n_y - p.l_align_tolerance) {
|
||||
// Aligned so keep it. If it is a marked tab save it as result,
|
||||
|
@ -981,7 +981,7 @@ int ColPartition::CountOverlappingBoxes(const TBOX& box) {
|
||||
return overlap_count;
|
||||
}
|
||||
|
||||
// Computes and sets the type_ and first_colum_, last_column_ and column_set_.
|
||||
// Computes and sets the type_ and first_column_, last_column_ and column_set_.
|
||||
// resolution refers to the ppi resolution of the image.
|
||||
void ColPartition::SetPartitionType(int resolution, ColPartitionSet* columns) {
|
||||
int first_spanned_col = -1;
|
||||
|
@ -695,7 +695,7 @@ class ColPartition : public ELIST2_LINK {
|
||||
// one partner. This makes block creation simpler.
|
||||
// If get_desperate is true, goes to more desperate merge methods
|
||||
// to merge flowing text before breaking partnerships.
|
||||
void RefinePartners(PolyBlockType type, bool get_desparate,
|
||||
void RefinePartners(PolyBlockType type, bool get_desperate,
|
||||
ColPartitionGrid* grid);
|
||||
|
||||
// Returns true if this column partition is in the same column as
|
||||
|
@ -1438,7 +1438,7 @@ void ColPartitionGrid::FindMergeCandidates(const ColPartition* part,
|
||||
}
|
||||
|
||||
// Smoothes the region type/flow type of the given part by looking at local
|
||||
// neigbours and the given image mask. Searches a padded rectangle with the
|
||||
// neighbours and the given image mask. Searches a padded rectangle with the
|
||||
// padding truncated on one size of the part's box in turn for each side,
|
||||
// using the result (if any) that has the least distance to all neighbours
|
||||
// that contribute to the decision. This biases in favor of rectangular
|
||||
|
@ -200,7 +200,7 @@ class ColPartitionGrid : public BBGrid<ColPartition,
|
||||
bool debug, ColPartition_CLIST* candidates);
|
||||
|
||||
// Smoothes the region type/flow type of the given part by looking at local
|
||||
// neigbours and the given image mask. Searches a padded rectangle with the
|
||||
// neighbours and the given image mask. Searches a padded rectangle with the
|
||||
// padding truncated on one size of the part's box in turn for each side,
|
||||
// using the result (if any) that has the least distance to all neighbours
|
||||
// that contribute to the decision. This biases in favor of rectangular
|
||||
|
@ -671,7 +671,7 @@ BOOL8 find_best_dropout_row( //find neighbours
|
||||
TO_ROW_IT *row_it, //current position
|
||||
BOOL8 testing_on //correct orientation
|
||||
) {
|
||||
inT32 next_index; //of neigbouring row
|
||||
inT32 next_index; //of neighbouring row
|
||||
inT32 row_offset; //from current row
|
||||
inT32 abs_dist; //absolute distance
|
||||
inT8 row_inc; //increment to row_index
|
||||
|
@ -740,7 +740,7 @@ StructuredTable* TableRecognizer::RecognizeTable(const TBOX& guess) {
|
||||
table->set_line_grid(line_grid_);
|
||||
table->set_max_text_height(max_text_height_);
|
||||
|
||||
// Try to solve ths simple case, a table with *both*
|
||||
// Try to solve this simple case, a table with *both*
|
||||
// vertical and horizontal lines.
|
||||
if (RecognizeLinedTable(guess, table))
|
||||
return table;
|
||||
|
@ -33,7 +33,7 @@ typedef signed int char32;
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
// Data holder class for a font, intented to avoid having to work with Pango or
|
||||
// Data holder class for a font, intended to avoid having to work with Pango or
|
||||
// FontConfig-specific objects directly.
|
||||
class PangoFontInfo {
|
||||
public:
|
||||
|
@ -79,7 +79,7 @@ typedef struct
|
||||
/**********************************************************************
|
||||
* new_measurement
|
||||
*
|
||||
* Initalize a record to hold a measurement of a group of individual
|
||||
* Initialize a record to hold a measurement of a group of individual
|
||||
* samples.
|
||||
**********************************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user