diff --git a/src/ccmain/ltrresultiterator.cpp b/src/ccmain/ltrresultiterator.cpp index 0cd410faa6..46f4e42826 100644 --- a/src/ccmain/ltrresultiterator.cpp +++ b/src/ccmain/ltrresultiterator.cpp @@ -415,9 +415,9 @@ const char* ChoiceIterator::GetUTF8Text() const { } // Returns the confidence of the current choice depending on the used language -// data. If only LSTM traineddata is used the value range is 0.0f - 1.0f. All +// data. If only LSTM traineddata is used the value range is 0.0f - 1.0f. All // choices for one symbol should roughly add up to 1.0f. -// If only traineddata of the legacy engine is used, the number should be +// If only traineddata of the legacy engine is used, the number should be // interpreted as a percent probability. (0.0f-100.0f) In this case probabilities // won't add up to 100. Each one stands on its own. float ChoiceIterator::Confidence() const { diff --git a/src/lstm/lstmtrainer.cpp b/src/lstm/lstmtrainer.cpp index 31a213f2f8..31a92c231c 100644 --- a/src/lstm/lstmtrainer.cpp +++ b/src/lstm/lstmtrainer.cpp @@ -2,7 +2,6 @@ // File: lstmtrainer.cpp // Description: Top-level line trainer class for LSTM-based networks. // Author: Ray Smith -// Created: Fir May 03 09:14:06 PST 2013 // // (C) Copyright 2013, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); @@ -879,7 +878,7 @@ Trainability LSTMTrainer::PrepareForBackward(const ImageData* trainingdata, targets->SubtractAllFromFloat(*fwd_outputs); if (debug_interval_ != 0) { if (truth_text != ocr_text) { - tprintf("Iteration %d: BEST OCR TEXT : %s\n", + tprintf("Iteration %d: BEST OCR TEXT : %s\n", training_iteration(), ocr_text.string()); } } diff --git a/src/training/tesstrain_utils.py b/src/training/tesstrain_utils.py index 600acfb10a..f7ba62bbb2 100644 --- a/src/training/tesstrain_utils.py +++ b/src/training/tesstrain_utils.py @@ -226,7 +226,7 @@ def parse_flags(argv=None): ctx.output_dir = mkdtemp(prefix=f"trained-{ctx.lang_code}-{ctx.timestamp}") log.info(f"Output directory set to: {ctx.output_dir}") - # Location where intermediate files will be created. + # Location where intermediate files will be created. if not ctx.tmp_dir: ctx.training_dir = mkdtemp(prefix=f"{ctx.lang_code}-{ctx.timestamp}") else: diff --git a/src/training/validate_myanmar.cpp b/src/training/validate_myanmar.cpp index e14437ef3f..173ddf09e7 100644 --- a/src/training/validate_myanmar.cpp +++ b/src/training/validate_myanmar.cpp @@ -132,7 +132,7 @@ bool ValidateMyanmar::ConsumeOptionalSignsIfPresent() { // Returns true if the unicode is a Myanmar "letter" including consonants // and independent vowels. Although table 16-3 distinguishes between some // base consonants and vowels, the extensions make no such distinction, so we -// put them all into a single bucket. +// put them all into a single bucket. // Update MYANMAR LETTER based on following: // https://unicode.org/charts/PDF/U1000.pdf - Myanmar // http://unicode.org/charts/PDF/UAA60.pdf - Myanmar Extended-A @@ -144,14 +144,14 @@ bool ValidateMyanmar::IsMyanmarLetter(char32 ch) { ch == 0x1061 || ch == 0x1065 || ch == 0x1066 || (0x106e <= ch && ch <= 0x1070) || (0x1075 <= ch && ch <= 0x1081) || ch == 0x108e || (0xa9e0 <= ch && ch <= 0xa9e4) || - (0xa9e7 <= ch && ch <= 0xa9ef) || (0xa9fa <= ch && ch <= 0xa9fe) || + (0xa9e7 <= ch && ch <= 0xa9ef) || (0xa9fa <= ch && ch <= 0xa9fe) || (0xaa60 <= ch && ch <= 0xaa6f) || (0xaa71 <= ch && ch <= 0xaa73) || ch == 0xaa7a || ch == 0xaa7e || ch == 0xaa7f; } // Returns true if ch is a Myanmar digit or other symbol that does not take // part in being a syllable eg. punctuation marks. -// MYANMAR DIGIT, MYANMAR SYMBOL, MYANMAR LOGOGRAM +// MYANMAR DIGIT, MYANMAR SYMBOL, MYANMAR LOGOGRAM // REDUPLICATION MARKS /* static */ bool ValidateMyanmar::IsMyanmarOther(char32 ch) {