Fix some typos

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2024-02-20 16:45:32 +01:00
parent 8e6af37da2
commit fbff9362ce
16 changed files with 17 additions and 17 deletions

View File

@ -474,7 +474,7 @@ public:
* timeout_millisec terminates processing if any single page * timeout_millisec terminates processing if any single page
* takes too long. Set to 0 for unlimited time. * takes too long. Set to 0 for unlimited time.
* *
* renderer is responible for creating the output. For example, * renderer is responsible for creating the output. For example,
* use the TessTextRenderer if you want plaintext output, or * use the TessTextRenderer if you want plaintext output, or
* the TessPDFRender to produce searchable PDF. * the TessPDFRender to produce searchable PDF.
* *

View File

@ -960,7 +960,7 @@ bool Tesseract::ReassignDiacritics(int pass, PAGE_RES_IT *pr_it, bool *make_next
} }
} }
if (debug_noise_removal) { if (debug_noise_removal) {
tprintf("Used %d/%d overlapped %d/%d non-overlaped diacritics on word:", num_overlapped_used, tprintf("Used %d/%d overlapped %d/%d non-overlapped diacritics on word:", num_overlapped_used,
num_overlapped, non_overlapped_used, non_overlapped); num_overlapped, non_overlapped_used, non_overlapped);
real_word->bounding_box().print(); real_word->bounding_box().print();
} }

View File

@ -361,7 +361,7 @@ TBLOB *TBLOB::ClassifyNormalizeIfNeeded() const {
rotated_blob = new TBLOB(*this); rotated_blob = new TBLOB(*this);
const FCOORD &rotation = denorm_.block()->classify_rotation(); const FCOORD &rotation = denorm_.block()->classify_rotation();
// Move the rotated blob back to the same y-position so that we // Move the rotated blob back to the same y-position so that we
// can still distinguish similar glyphs with differeny y-position. // can still distinguish similar glyphs with different y-position.
float target_y = float target_y =
kBlnBaselineOffset + (rotation.y() > 0 ? x_middle - box.left() : box.right() - x_middle); kBlnBaselineOffset + (rotation.y() > 0 ? x_middle - box.left() : box.right() - x_middle);
rotated_blob->Normalize(nullptr, &rotation, &denorm_, x_middle, y_middle, 1.0f, 1.0f, 0.0f, rotated_blob->Normalize(nullptr, &rotation, &denorm_, x_middle, y_middle, 1.0f, 1.0f, 0.0f,

View File

@ -212,7 +212,7 @@ private:
// Flag indicates that the unichars are sorted, allowing faster set // Flag indicates that the unichars are sorted, allowing faster set
// operations with another shape. // operations with another shape.
bool unichars_sorted_ = false; bool unichars_sorted_ = false;
// If this Shape is part of a ShapeTable the destiation_index_ is the index // If this Shape is part of a ShapeTable the destination_index_ is the index
// of some other shape in the ShapeTable with which this shape is merged. // of some other shape in the ShapeTable with which this shape is merged.
int destination_index_ = 0; int destination_index_ = 0;
// Array of unichars, each with a set of fonts. Each unichar has at most // Array of unichars, each with a set of fonts. Each unichar has at most

View File

@ -646,7 +646,7 @@ void ColPartitionSet::AddPartition(ColPartition *new_part,
// | Double width heading | // | Double width heading |
// |-----------------------------------------------------------------| // |-----------------------------------------------------------------|
// |-------------------------------| |-------------------------------| // |-------------------------------| |-------------------------------|
// | Common width ColParition | | Common width ColPartition | // | Common width ColPartition | | Common width ColPartition |
// |-------------------------------| |-------------------------------| // |-------------------------------| |-------------------------------|
// the layout with two common-width columns has better coverage than the // the layout with two common-width columns has better coverage than the
// double width heading, because the coverage is "good," even though less in // double width heading, because the coverage is "good," even though less in

View File

@ -142,7 +142,7 @@ private:
// | Double width heading | // | Double width heading |
// |-----------------------------------------------------------------| // |-----------------------------------------------------------------|
// |-------------------------------| |-------------------------------| // |-------------------------------| |-------------------------------|
// | Common width ColParition | | Common width ColPartition | // | Common width ColPartition | | Common width ColPartition |
// |-------------------------------| |-------------------------------| // |-------------------------------| |-------------------------------|
// the layout with two common-width columns has better coverage than the // the layout with two common-width columns has better coverage than the
// double width heading, because the coverage is "good," even though less in // double width heading, because the coverage is "good," even though less in

View File

@ -120,7 +120,7 @@ C_OUTLINE_LIST *OL_BUCKETS::scan_next(decltype(buckets)::iterator in_it) {
int32_t OL_BUCKETS::outline_complexity(C_OUTLINE *outline, // parent outline int32_t OL_BUCKETS::outline_complexity(C_OUTLINE *outline, // parent outline
int32_t max_count, // max output int32_t max_count, // max output
int16_t depth // recurion depth int16_t depth // recursion depth
) { ) {
TDimension xmin, xmax; // coord limits TDimension xmin, xmax; // coord limits
TDimension ymin, ymax; TDimension ymin, ymax;

View File

@ -19,7 +19,7 @@
#ifndef TESSERACT_TEXTORD_STROKEWIDTH_H_ #ifndef TESSERACT_TEXTORD_STROKEWIDTH_H_
#define TESSERACT_TEXTORD_STROKEWIDTH_H_ #define TESSERACT_TEXTORD_STROKEWIDTH_H_
#include "blobbox.h" // BlobNeighourDir. #include "blobbox.h" // BlobNeighbourDir.
#include "blobgrid.h" // Base class. #include "blobgrid.h" // Base class.
#include "colpartitiongrid.h" #include "colpartitiongrid.h"
#include "textlineprojection.h" #include "textlineprojection.h"

View File

@ -1653,7 +1653,7 @@ void TableFinder::GrowTableToIncludeLines(const TBOX &table_box,
} }
// Checks whether the horizontal line belong to the table by looking at the // Checks whether the horizontal line belong to the table by looking at the
// side spacing of extra ColParitions that will be included in the table // side spacing of extra ColPartitions that will be included in the table
// due to expansion // due to expansion
bool TableFinder::HLineBelongsToTable(const ColPartition &part, bool TableFinder::HLineBelongsToTable(const ColPartition &part,
const TBOX &table_box) { const TBOX &table_box) {

View File

@ -329,7 +329,7 @@ protected:
void GrowTableToIncludeLines(const TBOX &table_box, const TBOX &search_range, void GrowTableToIncludeLines(const TBOX &table_box, const TBOX &search_range,
TBOX *result_box); TBOX *result_box);
// Checks whether the horizontal line belong to the table by looking at the // Checks whether the horizontal line belong to the table by looking at the
// side spacing of extra ColParitions that will be included in the table // side spacing of extra ColPartitions that will be included in the table
// due to expansion // due to expansion
bool HLineBelongsToTable(const ColPartition &part, const TBOX &table_box); bool HLineBelongsToTable(const ColPartition &part, const TBOX &table_box);

View File

@ -17,7 +17,7 @@
#include <allheaders.h> #include <allheaders.h>
#include "bbgrid.h" // Base class. #include "bbgrid.h" // Base class.
#include "blobbox.h" // BlobNeighourDir. #include "blobbox.h" // BlobNeighbourDir.
#include "blobs.h" #include "blobs.h"
#include "colpartition.h" #include "colpartition.h"
#include "helpers.h" // for IntCastRounded #include "helpers.h" // for IntCastRounded

View File

@ -61,7 +61,7 @@ static bool is_single_quote(const char32 ch) {
0x2018, // left single quotation mark (English, others) 0x2018, // left single quotation mark (English, others)
0x2019, // right single quotation mark (Danish, Finnish, Swedish, Norw.) 0x2019, // right single quotation mark (Danish, Finnish, Swedish, Norw.)
// We may have to introduce a comma set with 0x201a // We may have to introduce a comma set with 0x201a
0x201B, // single high-reveresed-9 quotation mark (PropList.txt) 0x201B, // single high-reversed-9 quotation mark (PropList.txt)
0x2032, // prime 0x2032, // prime
0x300C, // left corner bracket (East Asian languages) 0x300C, // left corner bracket (East Asian languages)
0xFF07, // fullwidth apostrophe 0xFF07, // fullwidth apostrophe

View File

@ -32,7 +32,7 @@ namespace tesseract {
class WERD_RES; class WERD_RES;
// Statisitcs about character widths, gaps and seams. // Statistics about character widths, gaps and seams.
struct AssociateStats { struct AssociateStats {
AssociateStats() { AssociateStats() {
Clear(); Clear();

View File

@ -70,7 +70,7 @@ int Wordrec::end_recog() {
* This function holds any necessary post processing for the Wise Owl * This function holds any necessary post processing for the Wise Owl
* program. * program.
*/ */
void Wordrec::program_editdown(int32_t elasped_time) { void Wordrec::program_editdown(int32_t elapsed_time) {
#ifndef DISABLED_LEGACY_ENGINE #ifndef DISABLED_LEGACY_ENGINE
EndAdaptiveClassifier(); EndAdaptiveClassifier();
#endif // ndef DISABLED_LEGACY_ENGINE #endif // ndef DISABLED_LEGACY_ENGINE

View File

@ -52,7 +52,7 @@ public:
// tface.cpp // tface.cpp
void program_editup(const std::string &textbase, TessdataManager *init_classifier, void program_editup(const std::string &textbase, TessdataManager *init_classifier,
TessdataManager *init_dict); TessdataManager *init_dict);
void program_editdown(int32_t elasped_time); void program_editdown(int32_t elapsed_time);
int end_recog(); int end_recog();
int dict_word(const WERD_CHOICE &word); int dict_word(const WERD_CHOICE &word);
@ -246,7 +246,7 @@ public:
void program_editup(const std::string &textbase, TessdataManager *init_classifier, void program_editup(const std::string &textbase, TessdataManager *init_classifier,
TessdataManager *init_dict); TessdataManager *init_dict);
void cc_recog(WERD_RES *word); void cc_recog(WERD_RES *word);
void program_editdown(int32_t elasped_time); void program_editdown(int32_t elapsed_time);
void set_pass1(); void set_pass1();
void set_pass2(); void set_pass2();
int end_recog(); int end_recog();

View File

@ -210,7 +210,7 @@ TEST_F(UnicharcompressTest, DoesLigaturesWithDoubles) {
LoadUnicharset("por.unicharset"); LoadUnicharset("por.unicharset");
ExpectCorrect("por"); ExpectCorrect("por");
// Check that any unichar-id that is encoded with multiple codes has the // Check that any unichar-id that is encoded with multiple codes has the
// correct encoded_nulll_char_ in between. // correct encoded_null_char_ in between.
for (int u = 0; u <= unicharset_.size(); ++u) { for (int u = 0; u <= unicharset_.size(); ++u) {
RecodedCharID code; RecodedCharID code;
int len = compressed_.EncodeUnichar(u, &code); int len = compressed_.EncodeUnichar(u, &code);