They are moved from src/classify and src/lstm to src/training.
This reduces the size of the Tesseract library.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
It is only used in unittest/layout_test.cc after moving a test from
baseapi_test.cc to that file, so it can be made local.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The method was only used in unittest where it can be replaced by
UNICHARSET::load_from_file which also simplifies the code.
This allows removing the class InMemoryFilePointer and fixes a TODO.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Now more tests (those which use fileio) depend on the training build.
This is required since commit c5a50b93ce.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
GTEST_SKIP() returns from the function which caused two warnings:
CID 1402755 (#1 of 1): Resource leak (RESOURCE_LEAK)
CID 1402761 (#1 of 1): Structurally dead code (UNREACHABLE)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The test submodule now adds an image which is needed by the
pagesegmode_test.
That image was newly created for the test. Therefore the box
coordinates in the test had to be fixed by using data from
the hOCR output for the full image.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The test submodule now includes the files needed by the tatweel_test.
Fix also a linker error for tatweel_test.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The function pointers and callbacks file_reader_, file_writer_,
checkpointer_reader_ and checkpoint_writer_ are always set to
the same values. Replacing them by direct function calls
simplifies the code and allows removing more code from tesscallback.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Skip the tests which need the legacy code.
Add also code to those tests to use the user's locale to test that, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Linker error reported in issue #2439:
unittest/baseapi_test.cc:190:
undefined reference to
`tesseract::TessBaseAPI::AdaptToWordStr(tesseract::PageSegMode, char const*)'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
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>
clang warnings:
src/ccutil/unicharcompress.cpp:172:27: warning: comparison of integers of different signs: 'int' and 'std::__cxx1998::vector::size_type' (aka 'unsigned long') [-Wsign-compare]
src/lstm/recodebeam.cpp:129:29: warning: comparison of integers of different signs: 'std::__cxx1998::vector::size_type' (aka 'unsigned long') and 'int' [-Wsign-compare]
src/lstm/recodebeam.cpp:276:48: warning: comparison of integers of different signs: 'std::__cxx1998::vector::size_type' (aka 'unsigned long') and 'int' [-Wsign-compare]
unittest/imagedata_test.cc:101:21: warning: comparison of integers of different signs: 'int' and 'std::__cxx1998::vector::size_type' (aka 'unsigned long') [-Wsign-compare]
unittest/linlsq_test.cc:33:23: warning: comparison of integers of different signs: 'int' and 'std::__cxx1998::vector::size_type' (aka 'unsigned long') [-Wsign-compare]
unittest/linlsq_test.cc:44:23: warning: comparison of integers of different signs: 'int' and 'std::__cxx1998::vector::size_type' (aka 'unsigned long') [-Wsign-compare]
unittest/nthitem_test.cc:27:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
unittest/nthitem_test.cc:68:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
unittest/stats_test.cc:26:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
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
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>
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>
* Add abseil library
* Add minimalistic implementation for WriteStringToFile
* Add missing namespace for std::string
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Move IntDotProductSSE. That allows inlining of the code.
* Improve IntDotProductSSE by moving some instructions.
* Remove unused num_input_groups_ from IntSimdMatrix.
* Re-order elements in IntSimdMatrix to avoid padding.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
OCR of an image needs much more time than 55 s when running with
a debug build without optimisations on a slow host.
Signed-off-by: Stefan Weil <sw@weilnetz.de>