Skip to content

Commit

Permalink
Fix several typos (most of them found by codespell)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Dec 10, 2018
1 parent 5b65982 commit 7ebd315
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/training/text2image.cpp
Expand Up @@ -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
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions unittest/bitvector_test.cc
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion unittest/commandlineflags_test.cc
Expand Up @@ -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");

Expand Down
4 changes: 2 additions & 2 deletions unittest/indexmapbidi_test.cc
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion unittest/normstrngs_test.cc
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions unittest/pango_font_info_test.cc
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion unittest/tatweel_test.cc
Expand Up @@ -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;
Expand Down

0 comments on commit 7ebd315

Please sign in to comment.