Skip to content

Commit

Permalink
Remove spaces a line endings
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Apr 13, 2019
1 parent 12ca251 commit 78a957b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/ccmain/ltrresultiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions src/lstm/lstmtrainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/training/tesstrain_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/training/validate_myanmar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 78a957b

Please sign in to comment.