zdenop
47598fa208
Merge pull request #2396 from stweil/locale
...
Replace sscanf by std::stringstream
2019-04-19 11:27:34 +02:00
Stefan Weil
217c2530e6
Remove strtofloat
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-19 11:19:04 +02:00
Stefan Weil
7c3f9000cd
Replace sscanf by std::stringstream
...
Using std::stringstream allows working with the C locale, independent
of the current locale settings.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-19 11:19:04 +02:00
Stefan Weil
4194b93e3a
unittest: Add missing unittests to Makefile.am as comments
...
This gives a good overview of the missing unittests.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-19 11:14:43 +02:00
zdenop
f19f0eabff
Merge pull request #2394 from stweil/unittest
...
unittest: Fix and enable params_model_test
2019-04-18 21:34:45 +02:00
Stefan Weil
5529a5db11
unittest: Fix and enable params_model_test
...
This needs the latest test submodule.
The test uses LoadFromFile which is not used otherwise, so remove that
function from class ParamsModel.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-18 17:06:48 +02:00
Egor Pugin
b1078dd6e5
Poke sw build on appveyor.
2019-04-14 19:15:11 +03:00
zdenop
88b41bcbb5
Merge pull request #2388 from stweil/locale
...
Fix some locale dependencies
2019-04-14 16:28:06 +02:00
Stefan Weil
a1ffcd3654
Use std::stringstream for add_str_double
...
Using std::stringstream allows conversion of double to string
independent of the current locale setting.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-14 16:16:16 +02:00
Stefan Weil
aa64a63f69
Use std::stringstream to generate PDF output
...
Using std::stringstream simplifies the code and allows conversion of
double to string independent of the current locale setting.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-14 16:15:39 +02:00
Stefan Weil
78a957b989
Remove spaces a line endings
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-13 18:54:42 +02:00
Stefan Weil
12ca2513d4
Revert "e" flag for fopen
...
clang-tidy added it in commit ac0b191f6b
.
The "e" flag is an extension for glibc which sets the O_CLOEXEC flag,
so the file handle is not leaked to child processes. It is not needed
here.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-13 18:53:57 +02:00
Egor Pugin
eda953ca2a
Merge pull request #2383 from prodeveloper0/prodeveloper0-patch-1
...
Fix for MSVC
2019-04-11 01:27:17 +03:00
Samuel Lee
e32b3360aa
Fix for MSVC
...
LoadDataFromFile/SaveDataToFile use fopen with unsupport file mode 'e' in MSVC.
2019-04-11 02:33:51 +09:00
Egor Pugin
332a1a9809
Pass ssse/avx flags to all files to pacify VS ide.
2019-04-07 22:59:38 +03:00
zdenop
3c734e2d11
Merge pull request #2378 from stweil/typecast
...
Modernize code by replacing C type casts
2019-04-07 16:03:01 +02:00
Stefan Weil
f88a7f28e3
fontinfo: Fix wrong delete
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-07 12:16:04 +02:00
Stefan Weil
3dfe1b8807
classify: Modernize function UniformDensity
...
This should fix an issue reported by Codacy.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-07 12:13:45 +02:00
Stefan Weil
72c874140e
Modernize code by replacing C type casts
...
This was done using clang-tidy.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-07 09:04:51 +02:00
zdenop
95a15a7a82
fix cmake&clang build
2019-04-06 15:31:53 +02:00
zdenop
ab09b09da6
Merge pull request #2294 from bertsky/lstm-with-char-whitelist
...
trying to add tessedit_char_whitelist etc. again:
2019-04-06 14:41:30 +02:00
Robert Schubert
f80508bc71
added link to testing/README.md to dev rules
2019-04-06 08:13:03 +02:00
Robert Schubert
25a42ea42f
fixed failure report for tesstrain commands:
...
- with `set -e` in effect, looking at stdout
to detect failure is too late
2019-04-06 08:13:03 +02:00
Robert Schubert
56427b8935
added minimal description to dev rules
2019-04-06 08:13:03 +02:00
Robert Schubert
d5584e793e
fixed failure report for tesstrain commands:
...
- with `set -e` in effect, it does not make sense
to query `$?` indirectly
2019-04-06 08:13:03 +02:00
zdenop
be617b3722
Merge pull request #2361 from Shreeshrii/truth
...
Change message display for debug_level -1 during lstmtraining
2019-04-05 10:52:21 +02:00
zdenop
2982cb4ff3
Merge pull request #2368 from amitdo/no-legacy-fix
...
disable-legacy build: Do not include unused headers
2019-04-05 09:35:04 +02:00
zdenop
8f66616392
Merge pull request #2371 from stweil/modernize
...
Modernize code (clang-tidy check modernize-loop-convert)
2019-04-05 09:34:27 +02:00
Stefan Weil
d35a6f2de5
Modernize code (clang-tidy check modernize-deprecated-headers)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-05 08:29:00 +02:00
Stefan Weil
20d5eedd45
Modernize code (clang-tidy check modernize-loop-convert)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-05 08:29:00 +02:00
amitdo
fab9a54981
Remove unneeded 'SUBDIRS=' from 3 Makefile.am files
2019-04-04 19:31:39 +02:00
Shree
6673347986
Change page to line in message
2019-04-04 15:43:29 +00:00
Shree
51c3535310
Always display GROUND TRUTH. BEST OCR and ALIGNED TRUTH only if different for debug_level -1
2019-04-04 15:33:22 +00:00
Shree
84d4cc2e95
Display OCR TEXT and GROUND TRUTH only when different for debug_level = -1
2019-04-04 15:33:22 +00:00
Amit D
2069c057d6
Merge branch 'master' into no-legacy-fix
2019-04-04 18:26:22 +03:00
Egor Pugin
2a1d238bd5
Merge pull request #2366 from stweil/modernize
...
Modernize code with "using"
2019-04-04 15:13:10 +03:00
amitdo
546014aecd
disable-legacy build: Do not include unused headers
2019-04-04 15:09:08 +03:00
zdenop
801bd66db1
Merge pull request #2364 from Shreeshrii/pages
...
Change pages to lines in message
2019-04-04 08:06:10 +02:00
Stefan Weil
98346c2cd4
Modernize and format code
...
The code was modernized using clang-tidy with "modernize-use-using".
The modified files were then formatted using clang-tidy with
"google-readability-braces-around-statements", then clang-format
was applied.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-03 21:02:23 +02:00
Shreeshrii
613c2bf6e4
Change pages to lines in message
...
The pages variables refer to the lines in document. This change makes the messages clearer without changing the variable names.
2019-04-03 10:41:14 +05:30
Stefan Weil
e76d81a0d5
Include src/training when exporting compile commands with cmake
...
`cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..` is used to get the file
compile_commands.json which is required by clang-tidy.
Export compile commands for all source files, not only those from
the default build, so clang-tidy can cover all source files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-02 06:34:45 +02:00
Stefan Weil
e262d71a56
Modifiy formatting rules
...
* Allow a single line for empty functions only.
* Don't allow if statements on a single line.
This improves readability and helps when debugging.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-02 06:34:45 +02:00
Egor Pugin
3e7144e796
Update appveyor.yml
2019-04-01 22:59:33 +03:00
Egor Pugin
af7cc1ce4c
Fix windows build.
2019-04-01 22:38:01 +03:00
Stefan Weil
81fbd878dd
Add more missing include statements for Windows build
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-01 08:10:25 +02:00
Stefan Weil
ab009fae94
Remove macro WINDLLNAME
...
It is now no longer used.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 20:05:41 +02:00
Stefan Weil
77a5f2623e
Remove unused config variable tessedit_module_name
...
It was only defined for Windows builds.
Use also false instead of 0 to set the default value of
two boolean config variables.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 20:04:00 +02:00
Stefan Weil
c150b9832d
Add missing include statements for Windows build
...
The last commits which removed BOOL8 had broken the Windows build.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 19:02:29 +02:00
Stefan Weil
802f42e821
Remove BOOL8, TRUE, FALSE from host.h
...
Remove unneeded include statements for host.h, add required ones and
update the comments for the remaining include statements.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 18:27:20 +02:00
Stefan Weil
be96b7b660
bits16: Format code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 18:26:50 +02:00