Commit Graph

2979 Commits

Author SHA1 Message Date
Noah Metzger
f7663c69f6 Added detailed value description for glyph_confidences parameter
Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-08-27 10:52:15 +02:00
zdenop
d8237f3c60
Merge pull request #1864 from stweil/unittests
Fix and enable eight more unit tests
2018-08-26 19:48:56 +02:00
Stefan Weil
70665721f4 unittest: Fix and enable tfile_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
8e404679c1 unittest: Fix and enable tabvector_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
aac00836d5 unittest: Fix and enable tablerecog_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
7aef7a304f unittest: Fix and enable tablefind_test
This requires a local definition for macro ABSL_ARRAYSIZE
(normally defined as part of the Abseil API).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
f95725afcb unittest: Fix and enable stats_test
This requires a local definition for macro ABSL_ARRAYSIZE
(normally defined as part of the Abseil API).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
6df28fb3f0 unittest: Fix and enable rect_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
3d38e8ceb7 unittest: Fix and enable nthitem_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
f876ddb084 unittest: Fix and enable linlsq_test
Sort also the tests alphabetically.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Egor Pugin
4620674eca
Merge pull request #1863 from stweil/unittest
Add Google code for more unittests
2018-08-25 21:55:40 +03:00
Stefan Weil
aec9ce7757 unittest: Fix and enable intfeaturemap_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:39:41 +02:00
Stefan Weil
c4eda838aa unittest: Fix and enable indexmapbidi_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:39:40 +02:00
Stefan Weil
de7676c88e unittest: Fix and enable heap_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:39:40 +02:00
Stefan Weil
778092838a Add ARRAYSIZE macro for Google test environment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:39:40 +02:00
Stefan Weil
2dc0b68147 unittest: Fix and enable denorm_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
bb101defdb unittest: Fix and enable colpartition_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
68db6aa5df unittest: Fix and enable cleanapi_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
0dc5c8ef3f unittest: Fix and enable bitvector_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
2b7df59187 Add more unittests from Google
They were provided by Jeff Breidenbach <jbreiden@google.com>.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
f0337c2d1a Add more portability hacks for Google test environment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
7a2f8d9010 Move class tesseract::File from training to ccutil
This allows using the class for unittests, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Egor Pugin
f5705da1d9
Merge pull request #1859 from stweil/fix
Fix whitespace issues
2018-08-24 19:16:27 +03:00
Stefan Weil
f24426cd1b Convert CRLF line endings to LF
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-23 18:18:15 +02:00
Stefan Weil
63965bd750 Fix new whitespace issues
- add linefeed after last line
- remove blanks at line endings

This fixes some warnings from clang:

src/training/validate_javanese.h:63:51: warning:
 no newline at end of file [-Wnewline-eof]
src/training/validate_javanese.cpp:269:26: warning:
 no newline at end of file [-Wnewline-eof]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-23 18:18:15 +02:00
Egor Pugin
07acc2b260
Merge pull request #1856 from stweil/fix
Fix assertion caused by access to default TBOX
2018-08-23 00:08:38 +03:00
Stefan Weil
b08966addf Fix assertion caused by access to default TBOX
Instead of adding an empty TBOX at the end of the box list,
that corner case is now handled by passing a nullptr (like
it was already done for the first box in the list).

This avoids the calls of BoxMissMetric with a TBOX
which raises an assertion there (b == 0).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 21:40:26 +02:00
Egor Pugin
97f6864420
Merge pull request #1854 from stweil/cov
Fix several issues reported by Coverity Scan
2018-08-22 18:28:47 +03:00
Stefan Weil
7910a766fa Fix CID 1164567 (Dereference after null check)
It looks like the check cblob_ptr != nullptr is not needed.
If cblob_ptr were NULL, we would have seen crashes in compute_bounding_box.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
f3c7a17df3 Fix CID 1395108 (Dereference after null check)
Let's hope that word->best_choice is never NULL.
Overwise both the old and the new code would abort with SIGSEGV.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
6092a8f865 Fix CID 1395109 (Logically dead code)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
ac17663015 Fix CID 1395113 ('Constant' variable guards dead code)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
7e9dfefc5c Fix CID 1395114 ('Constant' variable guards dead code)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
99efc13de8 Fix CID 1395116 ('Constant' variable guards dead code)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Egor Pugin
621a8cd29d
Merge pull request #1851 from noahmetzger/winfix
Added the option for character accumulated glyph confidences.
2018-08-20 16:35:14 +03:00
Egor Pugin
1f3acca03a
Merge pull request #1850 from Shreeshrii/new-branch-name
add option --save_box_tiff to save box/tiff pairs with lstmf files
2018-08-20 12:39:52 +03:00
Noah Metzger
663be426f6 Added the option for character accumulated glyph confidences.
The parameter glyph_confidences is changed from bool to int.
An execution with value 1 outputs the hOCR file enriched with glyph confidences
for every timestep like before. An execution with value 2 outputs the timesteps
accumulated over the recognized characters.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-08-20 10:43:58 +02:00
Shree Devi Kumar
43e3f24bb0 add variable --save_box_tiff to Save box/tiff pairs along with lstmf files. 2018-08-20 08:24:09 +00:00
Egor Pugin
115fe7662c
Merge pull request #1844 from Shreeshrii/new-branch-name
Updates to Javanese Script Validation and Training
2018-08-17 13:24:28 +03:00
zdenop
debe3da36d remove duplicate include 2018-08-16 20:50:28 +02:00
Shree Devi Kumar
b34cf9d424 Javanese script training 2018-08-16 12:15:10 +00:00
Stefan Weil
e1c387c9b3 Fix typo in comments and variable name
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-16 11:38:36 +00:00
Stefan Weil
bf33301114 Fix typo in function name
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-16 11:38:36 +00:00
zdenop
e731324a08
Merge pull request #1841 from stweil/typo
Fix some typos
2018-08-14 16:51:35 +02:00
Stefan Weil
641237495a Fix typo in comments and variable name
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-14 16:20:27 +02:00
Stefan Weil
95ed924d81 Fix typo in function name
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-14 16:20:27 +02:00
zdenop
4671e2b0bf
Merge pull request #1840 from stweil/scrollview
scrollview: Clean include statements
2018-08-14 13:22:36 +02:00
Stefan Weil
ce135de37c scrollview: Clean include statements
cstring was included twice (reported by Martin Strunz).
Use C++ header files and sort them alphabetically.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-14 13:12:51 +02:00
Zdenko Podobný
296309c1f1 remove duplicate include. Fixes #1837 2018-08-14 13:06:14 +02:00
zdenop
fd492062d0
Merge pull request #1825 from atuyosi/fix-tesserocr-129
Revert Makefile.am to beta.2
2018-08-06 18:23:53 +02:00