diff --git a/src/training/text2image.cpp b/src/training/text2image.cpp index f1f308d30e..43c1a96a48 100644 --- a/src/training/text2image.cpp +++ b/src/training/text2image.cpp @@ -684,7 +684,7 @@ static int Main() { } int main(int argc, char** argv) { - // Respect enviroment variable. could be: + // Respect environment variable. could be: // fc (fontconfig), win32, and coretext // If not set force fontconfig for Mac OS. // See https://github.com/tesseract-ocr/tesseract/issues/736 @@ -693,7 +693,7 @@ int main(int argc, char** argv) { if (backend == NULL) { putenv("PANGOCAIRO_BACKEND=fc"); } else { - printf("Using '%s' as pango cairo backend based on enviroment " + printf("Using '%s' as pango cairo backend based on environment " "variable.\n", backend); } tesseract::CheckSharedLibraryVersion(); diff --git a/unittest/bitvector_test.cc b/unittest/bitvector_test.cc index 77a95e7785..54d849a3cc 100644 --- a/unittest/bitvector_test.cc +++ b/unittest/bitvector_test.cc @@ -28,7 +28,7 @@ class BitVectorTest : public testing::Test { std::string OutputNameToPath(const std::string& name) { return file::JoinPath(FLAGS_test_tmpdir, name); } - // Computes primes upto kPrimeLimit, using the seive of Eratosthenes. + // Computes primes up to kPrimeLimit, using the sieve of Eratosthenes. void ComputePrimes(BitVector* map) { map->Init(kPrimeLimit + 1); TestAll(*map, false); @@ -101,7 +101,7 @@ class BitVectorTest : public testing::Test { } }; -// Tests the seive of Eratosthenes as a way of testing set/reset and I/O. +// Tests the sieve of Eratosthenes as a way of testing set/reset and I/O. TEST_F(BitVectorTest, Primes) { BitVector map; ComputePrimes(&map); diff --git a/unittest/commandlineflags_test.cc b/unittest/commandlineflags_test.cc index da391e30c1..d767bc80dd 100644 --- a/unittest/commandlineflags_test.cc +++ b/unittest/commandlineflags_test.cc @@ -23,7 +23,7 @@ STRING_PARAM_FLAG(bar_string, "bar", "String flag for testing"); BOOL_PARAM_FLAG(foo_bool, false, "Bool flag for testing"); BOOL_PARAM_FLAG(bar_bool, false, "Bool flag for testing"); // A flag whose name is a single character, tested for backward -// compatability. This should be selected to not conflict with existing flags +// compatibility. This should be selected to not conflict with existing flags // in commontraining.cpp. STRING_PARAM_FLAG(q, "", "Single character name"); diff --git a/unittest/indexmapbidi_test.cc b/unittest/indexmapbidi_test.cc index 74bde1a6eb..25f9eabf28 100644 --- a/unittest/indexmapbidi_test.cc +++ b/unittest/indexmapbidi_test.cc @@ -29,7 +29,7 @@ class IndexMapBiDiTest : public testing::Test { std::string OutputNameToPath(const std::string& name) { return file::JoinPath(FLAGS_test_tmpdir, name); } - // Computes primes upto kPrimeLimit, using the seive of Eratosthenes. + // Computes primes up to kPrimeLimit, using the sieve of Eratosthenes. void ComputePrimes(IndexMapBiDi* map) { map->Init(kPrimeLimit + 1, false); map->SetMap(2, true); @@ -63,7 +63,7 @@ class IndexMapBiDiTest : public testing::Test { } }; -// Tests the seive of Eratosthenes as a way of testing setup. +// Tests the sieve of Eratosthenes as a way of testing setup. TEST_F(IndexMapBiDiTest, Primes) { IndexMapBiDi map; ComputePrimes(&map); diff --git a/unittest/normstrngs_test.cc b/unittest/normstrngs_test.cc index 44e6cc7eb6..76ba4dac57 100644 --- a/unittest/normstrngs_test.cc +++ b/unittest/normstrngs_test.cc @@ -310,7 +310,7 @@ TEST(NormstrngsTest, IsWhitespace) { EXPECT_TRUE(IsWhitespace('\t')); EXPECT_TRUE(IsWhitespace('\r')); EXPECT_TRUE(IsWhitespace('\n')); - // U+2000 thru U+200A + // U+2000 through U+200A for (char32 ch = 0x2000; ch <= 0x200A; ++ch) { SCOPED_TRACE(StringPrintf("Failed at U+%x", ch)); EXPECT_TRUE(IsWhitespace(ch)); diff --git a/unittest/pango_font_info_test.cc b/unittest/pango_font_info_test.cc index a95683fd25..875b57b38f 100644 --- a/unittest/pango_font_info_test.cc +++ b/unittest/pango_font_info_test.cc @@ -143,7 +143,7 @@ TEST_F(PangoFontInfoTest, CanDropUncoveredChars) { EXPECT_EQ(1, font_info_.DropUncoveredChars(&word)); EXPECT_EQ("oice", word); - // Dont drop non-letter characters like word joiners. + // Don't drop non-letter characters like word joiners. const char* kJoiners[] = { "\u2060", // U+2060 (WJ) "\u200C", // U+200C (ZWJ) @@ -192,7 +192,7 @@ TEST_F(FontUtilsTest, DoesFindAvailableFonts) { TEST_F(FontUtilsTest, DoesDetectMissingFonts) { // Only bold italic face is available. EXPECT_FALSE(FontUtils::IsAvailableFont("Arial")); - // Dont have a ttf for the Courier family. + // Don't have a ttf for the Courier family. EXPECT_FALSE(FontUtils::IsAvailableFont("Courier")); // Pango "synthesizes" the italic font from the available Verdana Regular and // includes it in its list, but it is not really loadable. diff --git a/unittest/tatweel_test.cc b/unittest/tatweel_test.cc index 98baf8a5d2..4f7ed92042 100644 --- a/unittest/tatweel_test.cc +++ b/unittest/tatweel_test.cc @@ -50,7 +50,7 @@ TEST_F(TatweelTest, DictIgnoresTatweel) { TEST_F(TatweelTest, UnicharsetLoadKeepsTatweel) { // This test verifies that a load of an existing unicharset keeps any - // existing tatweel for backwards compatability. + // existing tatweel for backwards compatibility. string filename = TestDataNameToPath("ara.unicharset"); EXPECT_TRUE(unicharset_.load_from_file(filename.c_str())); int num_tatweel = 0;