Skip to content

Commit 7ebd315

Browse files
committed
Fix several typos (most of them found by codespell)
Signed-off-by: Stefan Weil <[email protected]>
1 parent 5b65982 commit 7ebd315

7 files changed

+11
-11
lines changed

src/training/text2image.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ static int Main() {
684684
}
685685

686686
int main(int argc, char** argv) {
687-
// Respect enviroment variable. could be:
687+
// Respect environment variable. could be:
688688
// fc (fontconfig), win32, and coretext
689689
// If not set force fontconfig for Mac OS.
690690
// See https://github.com/tesseract-ocr/tesseract/issues/736
@@ -693,7 +693,7 @@ int main(int argc, char** argv) {
693693
if (backend == NULL) {
694694
putenv("PANGOCAIRO_BACKEND=fc");
695695
} else {
696-
printf("Using '%s' as pango cairo backend based on enviroment "
696+
printf("Using '%s' as pango cairo backend based on environment "
697697
"variable.\n", backend);
698698
}
699699
tesseract::CheckSharedLibraryVersion();

unittest/bitvector_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class BitVectorTest : public testing::Test {
2828
std::string OutputNameToPath(const std::string& name) {
2929
return file::JoinPath(FLAGS_test_tmpdir, name);
3030
}
31-
// Computes primes upto kPrimeLimit, using the seive of Eratosthenes.
31+
// Computes primes up to kPrimeLimit, using the sieve of Eratosthenes.
3232
void ComputePrimes(BitVector* map) {
3333
map->Init(kPrimeLimit + 1);
3434
TestAll(*map, false);
@@ -101,7 +101,7 @@ class BitVectorTest : public testing::Test {
101101
}
102102
};
103103

104-
// Tests the seive of Eratosthenes as a way of testing set/reset and I/O.
104+
// Tests the sieve of Eratosthenes as a way of testing set/reset and I/O.
105105
TEST_F(BitVectorTest, Primes) {
106106
BitVector map;
107107
ComputePrimes(&map);

unittest/commandlineflags_test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ STRING_PARAM_FLAG(bar_string, "bar", "String flag for testing");
2323
BOOL_PARAM_FLAG(foo_bool, false, "Bool flag for testing");
2424
BOOL_PARAM_FLAG(bar_bool, false, "Bool flag for testing");
2525
// A flag whose name is a single character, tested for backward
26-
// compatability. This should be selected to not conflict with existing flags
26+
// compatibility. This should be selected to not conflict with existing flags
2727
// in commontraining.cpp.
2828
STRING_PARAM_FLAG(q, "", "Single character name");
2929

unittest/indexmapbidi_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class IndexMapBiDiTest : public testing::Test {
2929
std::string OutputNameToPath(const std::string& name) {
3030
return file::JoinPath(FLAGS_test_tmpdir, name);
3131
}
32-
// Computes primes upto kPrimeLimit, using the seive of Eratosthenes.
32+
// Computes primes up to kPrimeLimit, using the sieve of Eratosthenes.
3333
void ComputePrimes(IndexMapBiDi* map) {
3434
map->Init(kPrimeLimit + 1, false);
3535
map->SetMap(2, true);
@@ -63,7 +63,7 @@ class IndexMapBiDiTest : public testing::Test {
6363
}
6464
};
6565

66-
// Tests the seive of Eratosthenes as a way of testing setup.
66+
// Tests the sieve of Eratosthenes as a way of testing setup.
6767
TEST_F(IndexMapBiDiTest, Primes) {
6868
IndexMapBiDi map;
6969
ComputePrimes(&map);

unittest/normstrngs_test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ TEST(NormstrngsTest, IsWhitespace) {
310310
EXPECT_TRUE(IsWhitespace('\t'));
311311
EXPECT_TRUE(IsWhitespace('\r'));
312312
EXPECT_TRUE(IsWhitespace('\n'));
313-
// U+2000 thru U+200A
313+
// U+2000 through U+200A
314314
for (char32 ch = 0x2000; ch <= 0x200A; ++ch) {
315315
SCOPED_TRACE(StringPrintf("Failed at U+%x", ch));
316316
EXPECT_TRUE(IsWhitespace(ch));

unittest/pango_font_info_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ TEST_F(PangoFontInfoTest, CanDropUncoveredChars) {
143143
EXPECT_EQ(1, font_info_.DropUncoveredChars(&word));
144144
EXPECT_EQ("oice", word);
145145

146-
// Dont drop non-letter characters like word joiners.
146+
// Don't drop non-letter characters like word joiners.
147147
const char* kJoiners[] = {
148148
"\u2060", // U+2060 (WJ)
149149
"\u200C", // U+200C (ZWJ)
@@ -192,7 +192,7 @@ TEST_F(FontUtilsTest, DoesFindAvailableFonts) {
192192
TEST_F(FontUtilsTest, DoesDetectMissingFonts) {
193193
// Only bold italic face is available.
194194
EXPECT_FALSE(FontUtils::IsAvailableFont("Arial"));
195-
// Dont have a ttf for the Courier family.
195+
// Don't have a ttf for the Courier family.
196196
EXPECT_FALSE(FontUtils::IsAvailableFont("Courier"));
197197
// Pango "synthesizes" the italic font from the available Verdana Regular and
198198
// includes it in its list, but it is not really loadable.

unittest/tatweel_test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ TEST_F(TatweelTest, DictIgnoresTatweel) {
5050

5151
TEST_F(TatweelTest, UnicharsetLoadKeepsTatweel) {
5252
// This test verifies that a load of an existing unicharset keeps any
53-
// existing tatweel for backwards compatability.
53+
// existing tatweel for backwards compatibility.
5454
string filename = TestDataNameToPath("ara.unicharset");
5555
EXPECT_TRUE(unicharset_.load_from_file(filename.c_str()));
5656
int num_tatweel = 0;

0 commit comments

Comments
 (0)