Skip to content

Commit 55fde61

Browse files
committed
classify: Fix typos in comments and strings
All of them were found by codespell. Signed-off-by: Stefan Weil <[email protected]>
1 parent 539b7fb commit 55fde61

10 files changed

+13
-13
lines changed

classify/adaptmatch.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ void Classify::EndAdaptiveClassifier() {
515515
* load_pre_trained_templates Indicates whether the pre-trained
516516
* templates (inttemp, normproto and pffmtable components)
517517
* should be lodaded. Should only be set to true if the
518-
* necesary classifier components are present in the
518+
* necessary classifier components are present in the
519519
* [lang].traineddata file.
520520
* Globals:
521521
* BuiltInTemplatesFile file to get built-in temps from
@@ -1720,7 +1720,7 @@ bool Classify::LooksLikeGarbage(TBLOB *blob) {
17201720
*
17211721
* Globals:
17221722
*
1723-
* @return Number of features extracted or 0 if an error occured.
1723+
* @return Number of features extracted or 0 if an error occurred.
17241724
* @note Exceptions: none
17251725
* @note History: Tue May 28 10:40:52 1991, DSJ, Created.
17261726
*/
@@ -2082,7 +2082,7 @@ void Classify::PrintAdaptiveMatchResults(const ADAPT_RESULTS& results) {
20822082

20832083
/*---------------------------------------------------------------------------*/
20842084
/**
2085-
* This routine steps thru each matching class in Results
2085+
* This routine steps through each matching class in Results
20862086
* and removes it from the match list if its rating
20872087
* is worse than the BestRating plus a pad. In other words,
20882088
* all good matches get moved to the front of the classes

classify/classify.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Classify::Classify()
151151
INT_MEMBER(classify_integer_matcher_multiplier, 10,
152152
"Integer Matcher Multiplier 0-255: ", this->params()),
153153
EnableLearning(true),
154-
INT_MEMBER(il1_adaption_test, 0, "Dont adapt to i/I at beginning of word",
154+
INT_MEMBER(il1_adaption_test, 0, "Don't adapt to i/I at beginning of word",
155155
this->params()),
156156
BOOL_MEMBER(classify_bln_numeric_mode, 0,
157157
"Assume the input is numbers [0-9].", this->params()),

classify/classify.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ class Classify : public CCStruct {
495495
// font combinations that the shape represents.
496496
UnicityTable<FontSet> fontset_table_;
497497

498-
INT_VAR_H(il1_adaption_test, 0, "Dont adapt to i/I at beginning of word");
498+
INT_VAR_H(il1_adaption_test, 0, "Don't adapt to i/I at beginning of word");
499499
BOOL_VAR_H(classify_bln_numeric_mode, 0,
500500
"Assume the input is numbers [0-9].");
501501
double_VAR_H(speckle_large_max_size, 0.30, "Max large speckle size");

classify/cluster.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ struct BUCKETS {
182182
FLOAT64 ChiSquared; // test threshold
183183
uinT16 NumberOfBuckets; // number of cells in histogram
184184
uinT16 Bucket[BUCKETTABLESIZE];// mapping to histogram buckets
185-
uinT32 *Count; // frequency of occurence histogram
185+
uinT32 *Count; // frequency of occurrence histogram
186186
FLOAT32 *ExpectedCount; // expected histogram
187187
};
188188

classify/clusttool.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <stdio.h>
2525

2626
/*-------------------------------------------------------------------------
27-
Public Funtion Prototype
27+
Public Function Prototype
2828
--------------------------------------------------------------------------*/
2929
uinT16 ReadSampleSize(FILE *File);
3030

classify/featdefs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ CHAR_DESC ReadCharDescription(const FEATURE_DEFS_STRUCT &FeatureDefs,
285285

286286
/*---------------------------------------------------------------------------*/
287287
/**
288-
* Search thru all features currently defined and return
288+
* Search through all features currently defined and return
289289
* the feature type for the feature with the specified short
290290
* name. Trap an error if the specified name is not found.
291291
*

classify/intfx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ using tesseract::TrainingSample;
4444
// The entries are in binary degrees where a full circle is 256 binary degrees.
4545
static float cos_table[INT_CHAR_NORM_RANGE];
4646
static float sin_table[INT_CHAR_NORM_RANGE];
47-
// Guards write access to AtanTable so we dont create it more than once.
47+
// Guards write access to AtanTable so we don't create it more than once.
4848
tesseract::CCUtilMutex atan_table_mutex;
4949

5050

classify/kdtree.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ bool KDTreeSearch::BoxIntersectsSearch(FLOAT32 *lower, FLOAT32 *upper) {
521521
* Walk a tree, calling action once on each node.
522522
*
523523
* Operation:
524-
* This routine walks thru the specified sub_tree and invokes action
524+
* This routine walks through the specified sub_tree and invokes action
525525
* action at each node as follows:
526526
* action(context, data, level)
527527
* data the data contents of the node being visited,

classify/mfoutline.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ LIST ConvertOutlines(TESSLINE *outline,
104104

105105
/*---------------------------------------------------------------------------*/
106106
/**
107-
* This routine searches thru the specified outline, computes
107+
* This routine searches through the specified outline, computes
108108
* a slope for each vector in the outline, and marks each
109109
* vector as having one of the following directions:
110110
* N, S, E, W, NE, NW, SE, SW
@@ -182,7 +182,7 @@ void FreeOutlines(LIST Outlines) {
182182

183183
/*---------------------------------------------------------------------------*/
184184
/**
185-
* This routine searches thru the specified outline and finds
185+
* This routine searches through the specified outline and finds
186186
* the points at which the outline changes direction. These
187187
* points are then marked as "extremities". This routine is
188188
* used as an alternative to FindExtremities(). It forces the

classify/picofeat.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void ConvertSegmentToPicoFeat(FPOINT *Start,
147147

148148
/*---------------------------------------------------------------------------*/
149149
/**
150-
* This routine steps thru the specified outline and cuts it
150+
* This routine steps through the specified outline and cuts it
151151
* up into pieces of equal length. These pieces become the
152152
* desired pico-features. Each segment in the outline
153153
* is converted into an integral number of pico-features.

0 commit comments

Comments
 (0)