From fbff9362ceab63d9026982da7abf7fb13c758583 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 20 Feb 2024 16:45:32 +0100 Subject: [PATCH] Fix some typos Signed-off-by: Stefan Weil --- include/tesseract/baseapi.h | 2 +- src/ccmain/control.cpp | 2 +- src/ccstruct/blobs.cpp | 2 +- src/classify/shapetable.h | 2 +- src/textord/colpartitionset.cpp | 2 +- src/textord/colpartitionset.h | 2 +- src/textord/edgblob.cpp | 2 +- src/textord/strokewidth.h | 2 +- src/textord/tablefind.cpp | 2 +- src/textord/tablefind.h | 2 +- src/textord/textlineprojection.cpp | 2 +- src/training/unicharset/normstrngs.cpp | 2 +- src/wordrec/associate.h | 2 +- src/wordrec/tface.cpp | 2 +- src/wordrec/wordrec.h | 4 ++-- unittest/unicharcompress_test.cc | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/tesseract/baseapi.h b/include/tesseract/baseapi.h index 103ca7b1c9..535f20a129 100644 --- a/include/tesseract/baseapi.h +++ b/include/tesseract/baseapi.h @@ -474,7 +474,7 @@ class TESS_API TessBaseAPI { * timeout_millisec terminates processing if any single page * 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 * the TessPDFRender to produce searchable PDF. * diff --git a/src/ccmain/control.cpp b/src/ccmain/control.cpp index d6da06dfa1..5825813f88 100644 --- a/src/ccmain/control.cpp +++ b/src/ccmain/control.cpp @@ -960,7 +960,7 @@ bool Tesseract::ReassignDiacritics(int pass, PAGE_RES_IT *pr_it, bool *make_next } } 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); real_word->bounding_box().print(); } diff --git a/src/ccstruct/blobs.cpp b/src/ccstruct/blobs.cpp index 9ab0fe78c1..6884f6ee51 100644 --- a/src/ccstruct/blobs.cpp +++ b/src/ccstruct/blobs.cpp @@ -361,7 +361,7 @@ TBLOB *TBLOB::ClassifyNormalizeIfNeeded() const { rotated_blob = new TBLOB(*this); const FCOORD &rotation = denorm_.block()->classify_rotation(); // 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 = 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, diff --git a/src/classify/shapetable.h b/src/classify/shapetable.h index ddf5f95749..0d2cd41c1b 100644 --- a/src/classify/shapetable.h +++ b/src/classify/shapetable.h @@ -212,7 +212,7 @@ class TESS_API Shape { // Flag indicates that the unichars are sorted, allowing faster set // operations with another shape. 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. int destination_index_ = 0; // Array of unichars, each with a set of fonts. Each unichar has at most diff --git a/src/textord/colpartitionset.cpp b/src/textord/colpartitionset.cpp index a68275dfbd..a1dc82203b 100644 --- a/src/textord/colpartitionset.cpp +++ b/src/textord/colpartitionset.cpp @@ -646,7 +646,7 @@ void ColPartitionSet::AddPartition(ColPartition *new_part, // | 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 // double width heading, because the coverage is "good," even though less in diff --git a/src/textord/colpartitionset.h b/src/textord/colpartitionset.h index 6a0c0daefa..60a78297fa 100644 --- a/src/textord/colpartitionset.h +++ b/src/textord/colpartitionset.h @@ -142,7 +142,7 @@ class ColPartitionSet : public ELIST_LINK { // | 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 // double width heading, because the coverage is "good," even though less in diff --git a/src/textord/edgblob.cpp b/src/textord/edgblob.cpp index 781b8e9f53..f9a52e7e8b 100644 --- a/src/textord/edgblob.cpp +++ b/src/textord/edgblob.cpp @@ -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 max_count, // max output - int16_t depth // recurion depth + int16_t depth // recursion depth ) { TDimension xmin, xmax; // coord limits TDimension ymin, ymax; diff --git a/src/textord/strokewidth.h b/src/textord/strokewidth.h index 1a542f99a1..bc88d8fd59 100644 --- a/src/textord/strokewidth.h +++ b/src/textord/strokewidth.h @@ -19,7 +19,7 @@ #ifndef TESSERACT_TEXTORD_STROKEWIDTH_H_ #define TESSERACT_TEXTORD_STROKEWIDTH_H_ -#include "blobbox.h" // BlobNeighourDir. +#include "blobbox.h" // BlobNeighbourDir. #include "blobgrid.h" // Base class. #include "colpartitiongrid.h" #include "textlineprojection.h" diff --git a/src/textord/tablefind.cpp b/src/textord/tablefind.cpp index 0b5fa502ff..843754cbd8 100644 --- a/src/textord/tablefind.cpp +++ b/src/textord/tablefind.cpp @@ -1653,7 +1653,7 @@ void TableFinder::GrowTableToIncludeLines(const TBOX &table_box, } // 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 bool TableFinder::HLineBelongsToTable(const ColPartition &part, const TBOX &table_box) { diff --git a/src/textord/tablefind.h b/src/textord/tablefind.h index e26404178a..2554afdbc1 100644 --- a/src/textord/tablefind.h +++ b/src/textord/tablefind.h @@ -329,7 +329,7 @@ class TESS_API TableFinder { void GrowTableToIncludeLines(const TBOX &table_box, const TBOX &search_range, TBOX *result_box); // 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 bool HLineBelongsToTable(const ColPartition &part, const TBOX &table_box); diff --git a/src/textord/textlineprojection.cpp b/src/textord/textlineprojection.cpp index 19eb86df0b..3242be0077 100644 --- a/src/textord/textlineprojection.cpp +++ b/src/textord/textlineprojection.cpp @@ -17,7 +17,7 @@ #include #include "bbgrid.h" // Base class. -#include "blobbox.h" // BlobNeighourDir. +#include "blobbox.h" // BlobNeighbourDir. #include "blobs.h" #include "colpartition.h" #include "helpers.h" // for IntCastRounded diff --git a/src/training/unicharset/normstrngs.cpp b/src/training/unicharset/normstrngs.cpp index db759cd70f..026feefd2e 100644 --- a/src/training/unicharset/normstrngs.cpp +++ b/src/training/unicharset/normstrngs.cpp @@ -61,7 +61,7 @@ static bool is_single_quote(const char32 ch) { 0x2018, // left single quotation mark (English, others) 0x2019, // right single quotation mark (Danish, Finnish, Swedish, Norw.) // 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 0x300C, // left corner bracket (East Asian languages) 0xFF07, // fullwidth apostrophe diff --git a/src/wordrec/associate.h b/src/wordrec/associate.h index 3cb609a2bf..0559d9ae1b 100644 --- a/src/wordrec/associate.h +++ b/src/wordrec/associate.h @@ -32,7 +32,7 @@ namespace tesseract { class WERD_RES; -// Statisitcs about character widths, gaps and seams. +// Statistics about character widths, gaps and seams. struct AssociateStats { AssociateStats() { Clear(); diff --git a/src/wordrec/tface.cpp b/src/wordrec/tface.cpp index 2744e277cf..06b9e9275a 100644 --- a/src/wordrec/tface.cpp +++ b/src/wordrec/tface.cpp @@ -70,7 +70,7 @@ int Wordrec::end_recog() { * This function holds any necessary post processing for the Wise Owl * program. */ -void Wordrec::program_editdown(int32_t elasped_time) { +void Wordrec::program_editdown(int32_t elapsed_time) { #ifndef DISABLED_LEGACY_ENGINE EndAdaptiveClassifier(); #endif // ndef DISABLED_LEGACY_ENGINE diff --git a/src/wordrec/wordrec.h b/src/wordrec/wordrec.h index 2ddf4be4a2..20bdbcf9e4 100644 --- a/src/wordrec/wordrec.h +++ b/src/wordrec/wordrec.h @@ -52,7 +52,7 @@ class TESS_API Wordrec : public Classify { // tface.cpp void program_editup(const std::string &textbase, TessdataManager *init_classifier, TessdataManager *init_dict); - void program_editdown(int32_t elasped_time); + void program_editdown(int32_t elapsed_time); int end_recog(); int dict_word(const WERD_CHOICE &word); @@ -246,7 +246,7 @@ class TESS_API Wordrec : public Classify { void program_editup(const std::string &textbase, TessdataManager *init_classifier, TessdataManager *init_dict); 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_pass2(); int end_recog(); diff --git a/unittest/unicharcompress_test.cc b/unittest/unicharcompress_test.cc index 31fcf3a264..98f1e3bcc6 100644 --- a/unittest/unicharcompress_test.cc +++ b/unittest/unicharcompress_test.cc @@ -210,7 +210,7 @@ TEST_F(UnicharcompressTest, DoesLigaturesWithDoubles) { LoadUnicharset("por.unicharset"); ExpectCorrect("por"); // 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) { RecodedCharID code; int len = compressed_.EncodeUnichar(u, &code);