Skip to content

Commit b3bd23e

Browse files
committed
Remove whitespace at line endings
Signed-off-by: Stefan Weil <[email protected]>
1 parent b95598a commit b3bd23e

10 files changed

+17
-19
lines changed

INSTALL.GIT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ all languages).
4141
You need an Internet connection and [curl](https://curl.haxx.se/) to compile `ScrollView.jar`
4242
because the build will automatically download
4343
[piccolo2d-core-3.0.jar](http://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-core/3.0/piccolo2d-core-3.0.jar > piccolo2d-core-3.0.jar) and
44-
[piccolo2d-extras-3.0.jar](http://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-extras/3.0/piccolo2d-extras-3.0.jar) and
44+
[piccolo2d-extras-3.0.jar](http://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-extras/3.0/piccolo2d-extras-3.0.jar) and
4545
[jaxb-api-2.3.1.jar](http://search.maven.org/remotecontent?filepath=javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar) and place them to `tesseract/java`.
4646

4747
Just run:

src/api/baseapi.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ class TESS_API TessBaseAPI {
613613
* Returned string must be freed with the delete [] operator.
614614
*/
615615
char* GetTSVText(int page_number);
616-
616+
617617
/**
618618
* Make a box file for LSTM training from the internal data structures.
619619
* Constructs coordinates in the original image - not just the rectangle.
@@ -630,15 +630,15 @@ class TESS_API TessBaseAPI {
630630
* Returned string must be freed with the delete [] operator.
631631
*/
632632
char* GetBoxText(int page_number);
633-
633+
634634
/**
635635
* The recognized text is returned as a char* which is coded in the same
636636
* format as a WordStr box file used in training.
637637
* page_number is a 0-based page index that will appear in the box file.
638638
* Returned string must be freed with the delete [] operator.
639639
*/
640640
char* GetWordStrBoxText(int page_number);
641-
641+
642642
/**
643643
* The recognized text is returned as a char* which is coded
644644
* as UNLV format Latin-1 with specific reject and suspect codes.

src/api/lstmboxrenderer.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ namespace tesseract {
2727
* page_number is a 0-base page index that will appear in the box file.
2828
* Returned string must be freed with the delete [] operator.
2929
*/
30-
static void AddBoxToLSTM(int right, int bottom, int top,
30+
static void AddBoxToLSTM(int right, int bottom, int top,
3131
int image_height_, int page_num,
3232
STRING* text) {
3333
text->add_str_int(" ", image_height_ - bottom);
3434
text->add_str_int(" ", right + 5);
3535
text->add_str_int(" ", image_height_ - top);
36-
text->add_str_int(" ", page_num);
36+
text->add_str_int(" ", page_num);
3737
}
38-
38+
3939
char* TessBaseAPI::GetLSTMBOXText(int page_number) {
4040
if (tesseract_ == nullptr || (page_res_ == nullptr && Recognize(nullptr) < 0))
4141
return nullptr;
@@ -44,7 +44,7 @@ char* TessBaseAPI::GetLSTMBOXText(int page_number) {
4444
int page_num = page_number;
4545
bool first_word = true;
4646
int left, top, right, bottom;
47-
47+
4848
LTRResultIterator* res_it = GetLTRIterator();
4949
while (!res_it->Empty(RIL_BLOCK)) {
5050
if (res_it->Empty(RIL_SYMBOL)) {

src/api/tesseractmain.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ static void PreloadRenderers(
537537
error = true;
538538
}
539539
}
540-
540+
541541
api->GetBoolVariable("tessedit_create_txt", &b);
542542
if (b || (!error && renderers->empty())) {
543543
tesseract::TessTextRenderer* renderer =

src/lstm/recodebeam.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Description: Beam search to decode from the re-encoded CJK as a sequence of
44
// smaller numbers in place of a single large code.
55
// Author: Ray Smith
6-
// Created: Fri Mar 13 09:12:01 PDT 2015
76
//
87
// (C) Copyright 2015, Google Inc.
98
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -210,8 +209,8 @@ class RecodeBeamSearch {
210209

211210
// Generates debug output of the content of the beams after a Decode.
212211
void DebugBeams(const UNICHARSET& unicharset) const;
213-
214-
// Stores the alternative characters of every timestep together with their
212+
213+
// Stores the alternative characters of every timestep together with their
215214
// probability.
216215
std::vector< std::vector<std::pair<const char*, float>>> timesteps;
217216

src/textord/colfind.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Description: Class to hold BLOBNBOXs in a grid for fast access
44
// to neighbours.
55
// Author: Ray Smith
6-
// Created: Wed Jun 06 17:22:01 PDT 2007
76
//
87
// (C) Copyright 2007, Google Inc.
98
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -926,7 +925,7 @@ void ColumnFinder::ComputeMeanColumnGap(bool any_multi_column) {
926925
&gap_samples);
927926
}
928927
mean_column_gap_ = any_multi_column && gap_samples > 0
929-
? total_gap / gap_samples : width_samples > 0
928+
? total_gap / gap_samples : width_samples > 0
930929
? total_width / width_samples : 0;
931930
}
932931

src/training/tesstrain.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ echo -e "USAGE: tesstrain.sh
2929
--maxpages # Specify maximum pages to output (default:0=all)
3030
--save_box_tiff # Save box/tiff pairs along with lstmf files.
3131
--xsize # Specify width of output image (default:3600)
32-
32+
3333
OPTIONAL flag for specifying directory with user specified box/tiff pairs.
3434
Files should be named similar to ${LANG_CODE}.${fontname}.exp${EXPOSURE}.box/tif
3535
--my_boxtiff_dir MY_BOXTIFF_DIR # Location of user specified box/tiff files.
36-
36+
3737
OPTIONAL flags for input data. If unspecified we will look for them in
3838
the langdata_dir directory.
3939
--training_text TEXTFILE # Text to render and use for training.

unittest/lstm_test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
// Generating the training data:
1313
// If the format of the lstmf (ImageData) file changes, the training data will
14-
// have to be regenerated as follows:
14+
// have to be regenerated as follows:
1515
//
1616
// Use --xsize 800 for text2image to be similar to original training data.
1717
//

unittest/lstm_test.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class LSTMTrainerTest : public testing::Test {
5858
return file::JoinPath(TESTING_DIR,
5959
"" + name);
6060
}
61-
61+
6262
void SetupTrainerEng(const std::string& network_spec, const std::string& model_name,
6363
bool recode, bool adam) {
6464
SetupTrainer(network_spec, model_name, "eng/eng.unicharset",

unittest/resultiterator_test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class ResultIteratorTest : public testing::Test {
235235

236236
// Tests layout analysis output (and scrollview) on the UNLV page numbered
237237
// 8087_054.3G.tif. (Dubrovnik), but only if --visual_test is true.
238-
//
238+
//
239239
//TEST_F(ResultIteratorTest, VisualTest) {
240240
// if (!FLAGS_visual_test) return;
241241
// const char* kIms[] = {"8087_054.3G.tif", "8071_093.3B.tif", nullptr};

0 commit comments

Comments
 (0)