Commit Graph

3859 Commits

Author SHA1 Message Date
Zdenko Podobný
bd7e42d9e7 Merge branch 'master' of https://github.com/tesseract-ocr/tesseract
* 'master' of https://github.com/tesseract-ocr/tesseract:
  Use universal location for docbook.xsl
2019-02-01 18:03:57 +01:00
Zdenko Podobný
114bc5016e improve cmake configuration 2019-02-01 18:02:28 +01:00
Chris Mayo
2106cba0a9 Use universal location for docbook.xsl
xsltproc will use the system catalog to find the local path.
Pass --nonet option to ensure the Internet is not used.
2019-02-01 17:55:59 +01:00
zdenop
0c2557f5e7
Merge pull request #2211 from stweil/icu-fix
configure: Remove header check for ICU
2019-02-01 14:06:40 +01:00
Stefan Weil
66da4df11d configure: Remove header check for ICU
It wrongly detects old versions of ICU as valid.
Checking with pkg-config is sufficient and also sets ICU_UC_LIBS.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-02-01 10:06:34 +01:00
Mikhail Akopov
7be04342cf Fix typo 2019-02-01 09:58:44 +01:00
Stefan Weil
b49806766e Fix AVX2 support for Windows builds with MSC
It was never detected, so the existing code for AVX2
was compiled but never used.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-30 11:40:17 +01:00
zdenop
fc55b5872d use AVX2 SSE for cmake&clang on Windows 2019-01-29 20:04:44 +01:00
zdenop
fd881e4486 fix cmake PACKAGE_VERSION to behave same way as in autotools 2019-01-29 20:01:55 +01:00
Stefan Weil
394839cdd7 Fix cmake compiler flags for AVX/SSE support
Commit 5f96ac1a71 had a typo
in the filename (simdetect.cpp / simddetect.cpp) which caused
a regression: AVX / AVX2 / SSE was no longer used.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-29 17:27:36 +01:00
Stefan Weil
b60321e6b8 Update test submodule
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-29 17:04:41 +01:00
zdenop
44038cb5e8
Merge pull request #2200 from Shreeshrii/master
fix and enable more unittests
2019-01-27 08:24:41 +01:00
Shree Devi Kumar
4d9bc11fd3 add --xsize as parameter for tesstrain 2019-01-27 07:00:25 +00:00
Shree Devi Kumar
1ac76d8825 Partially fix and enable more unittests
Add more subtests to langmodel_test

Add more subtests to langmodel_test

fix and enable lstmtrainer_test

fix and enable some subtests from recodebeam_test

partial fix for resultiterator_test

fix typo removing the terminating linefeed.

fix typo

changes
2019-01-27 06:49:57 +00:00
Shree Devi Kumar
eaf5deb6b3 Disable ligature related subtest in stringrenderer 2019-01-27 06:49:56 +00:00
Stefan Weil
8f87ebb463 Update test submodule
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-26 17:07:53 +01:00
Stefan Weil
14d5547bf0 Update test submodule
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-26 10:40:17 +01:00
zdenop
7ddca79f12
Merge pull request #2194 from Shreeshrii/master
Disable ligature related subtest in stringrenderer
2019-01-25 07:21:38 +01:00
zdenop
b30e92fb8a turn off openmp build for cmake (issue #263) 2019-01-24 23:03:47 +01:00
Shree Devi Kumar
51604dd170 Disable ligature related subtest in stringrenderer 2019-01-24 18:51:33 +00:00
Stefan Weil
50f5662723
Merge pull request #2193 from Shreeshrii/master
More updates to LSTM related unittests
2019-01-24 17:11:00 +01:00
Shree Devi Kumar
dbb12d6fde more updates to lstm related unittests 2019-01-24 15:39:37 +00:00
zdenop
9e47105977
Merge pull request #2192 from stweil/unittest
unittest: Skip test is traineddata is missing in applybox_test
2019-01-24 16:35:56 +01:00
Stefan Weil
86b0f3625e unittest: Skip test is traineddata is missing in applybox_test
Many tests have preconditions like a correct version of the test submodule
or installed traineddata files at the right location. They fail or even
crash if those preconditions are not met.

The latest version of Googletest supports skipping single tests with
GTEST_SKIP which is used here to skip tests in applybox_test when
tessdata/eng.traineddata is missing.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-24 16:10:52 +01:00
Shree Devi Kumar
36906064a5 Add LF to INFO msgs in lstm_test 2019-01-24 11:40:53 +00:00
Stefan Weil
87a4fbac05 Update test submodule
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-24 11:29:22 +01:00
Stefan Weil
14086af474 unittest: Add missing Leptonica library for stringrenderer_test
It is needed for builds without `--disable-shared`.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-24 11:29:22 +01:00
Stefan Weil
6b7f7db63e Fix and enable shapetable_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-24 11:23:20 +01:00
Shreeshrii
bbd23bbfd2 Fix and enable lstm related unittests (#2180)
* Fix and build lstm related unittests
* Use ./tmp instead of ./ for files created by unittests
2019-01-24 08:01:19 +01:00
zdenop
12c1abcb6b
Merge pull request #2189 from stweil/fix
Fix memory leak for PNG images
2019-01-24 07:59:55 +01:00
zdenop
059c50be8c
Merge pull request #2184 from stweil/tests
Fix and enable stringrenderer_test
2019-01-24 07:59:07 +01:00
zdenop
093efcde0f
Merge pull request #2188 from diegodlh/shape_clustering_flag
tesstrain.sh was failing with line 81: ENABLE_SHAPE_CLUSTERING: unbound variable
2019-01-24 07:54:48 +01:00
Stefan Weil
9e6e3a0232 Fix memory leak for PNG images
Commit 5fe1390748 used an implementation
which created a new Pix object. That object was never destroyed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 20:05:10 +01:00
Diego de la Hera
1a398a5b5d removed reference to unbound variable 2019-01-23 15:04:16 -03:00
Stefan Weil
daf61f75db automake: Add missing dependency for "check" target (fix parallel build)
Some unit tests use code from training. Those tests are enabled
if training is enabled, so for that case the "check" target
depends on the "training" target.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 17:29:51 +01:00
Stefan Weil
ecf73f5bc7 training: Don't terminate after processing 8 fonts or 8 images
tesstrain_utils.sh sets the shell flag -e, so it exits immediately
if a command exits with a non-zero status.

The following command returns a non-zero status as soon as counter is a
multiple of par_factor (par_factor=8, that means as soon as 8 fonts or
images are processed):

    let rem=counter%par_factor

The new code fixes this undesired exit.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 17:26:40 +01:00
Stefan Weil
32e9d7c8f5 training: Fix some compiler warnings (signed/unsigned)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 13:55:13 +01:00
Stefan Weil
e4b862d588 pango_font_info: Fix runtime error messages from Pango
pango_coverage_get and pango_coverage_unref should not be called
with coverage == nullptr.

pango_font_get_coverage should not be called with font == nullptr.

Otherwise Pango prints runtime error messages:

    (process:12657): Pango-CRITICAL **: pango_coverage_get: assertion 'coverage != NULL' failed
    (process:12657): Pango-CRITICAL **: pango_coverage_unref: assertion 'coverage != NULL' failed
    (process:12657): Pango-CRITICAL **: pango_font_get_coverage: assertion 'font != NULL' failed
    (process:12657): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Typically those errors occur if a required font is not installed,
so this can be a quite common error.

Fix also a potential resource leak in PangoFontInfo::CoversUTF8Text.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 13:55:13 +01:00
Stefan Weil
4b24d8cdf6 Fix and enable stringrenderer_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 13:55:13 +01:00
Stefan Weil
a6da64234e unittest: Fix and enable validate_myanmar_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 13:54:27 +01:00
Stefan Weil
d67287a5d9 unittest: Fix and enable validate_khmer_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 13:54:27 +01:00
Stefan Weil
611d5e6358 unittest: Fix and enable validate_indic_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 13:54:27 +01:00
Stefan Weil
d97f67da63 unittest: Fix and enable validate_grapheme_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 13:54:27 +01:00
Stefan Weil
a702f2d2aa unittest: Replace ABSL_ARRAYSIZE by ARRAYSIZE
Remove the local definition of ABSL_ARRAYSIZE
to avoid a conflict with Abseil.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-23 13:54:27 +01:00
Shree Devi Kumar
77d0b6ce8e fix WORDLIST filename 2019-01-22 15:49:55 +01:00
zdenop
f62181c86e
Merge pull request #2178 from stweil/master
Update file paths in dawg_test
2019-01-21 20:16:20 +01:00
Stefan Weil
2c0ddb4220 Update file paths in dawg_test
Get unicharset and wordlist files from test/testing and use the latest
test submodule which provides those files.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-21 20:08:11 +01:00
Shree Devi Kumar
57f74d2b73 Fix file location for unicharset for mastertrainer_test 2019-01-21 17:36:08 +01:00
Shree Devi Kumar
0ee4f63019 Formatting LOG messages from layout_test 2019-01-21 17:36:08 +01:00
Stefan Weil
4edc61fd3f unittest: Add missing license headers for dawg_test and layout_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-21 17:36:08 +01:00