Commit Graph

5785 Commits

Author SHA1 Message Date
Stefan Weil
19afcdb79b Remove unused function UnicharIdArrayUtils::find_in
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-20 15:51:28 +01:00
Stefan Weil
7af5b75b8f Disable unused WriteMemoryCallback if libcurl is not used
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-20 15:49:06 +01:00
Egor Pugin
db7a977eab Use smart pointers. 2021-03-20 16:04:45 +03:00
Egor Pugin
69ab5bbf65 Misc. 2021-03-20 16:04:00 +03:00
Stefan Weil
f176e7c274 Fix double free caused by commit f33e80e (fixes issue #3348)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-20 12:37:56 +01:00
Stefan Weil
87b0a4de97 Rename GenericVector::get
The new name GenericVector::at is compatible with standard containers.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-20 09:42:19 +01:00
Stefan Weil
2c1c09bd6a Rename UnicityTable::get, UnicityTable::get_mutable
The new name UnicityTable::at is compatible with standard containers.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-20 09:40:00 +01:00
Stefan Weil
883353df63 Replace std::array by std::vector to avoid stack overflow
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-20 09:39:16 +01:00
Egor Pugin
a88ea7684e
Merge pull request #3345 from stweil/vector
Replace more PointerVector by std::vector
2021-03-20 11:15:52 +03:00
Stefan Weil
ec2c989d00 Modernize code in src/classify
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-20 09:06:40 +01:00
Stefan Weil
54aec32586 Replace remaining PointerVector by std::vector for src/lstm
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 22:22:04 +01:00
Stefan Weil
0d739530a5 Remove unused PointerVector::DeSerialize, PonterVector::DeSerializeElement
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 21:53:17 +01:00
Stefan Weil
7207cf13d7 Replace more PointerVector by std::vector for src/ccstruct
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 21:53:08 +01:00
Stefan Weil
aa64d83c2f Replace more PointerVector by std::vector for src/classify
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 15:22:29 +01:00
Stefan Weil
79477dc2fe Replace more PointerVector by std::vector for src/ccstruct
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 14:46:25 +01:00
Egor Pugin
2d8054767c
Merge pull request #3344 from stweil/vector
Replace more GenericVector and PointerVector by std::vector
2021-03-19 15:40:37 +03:00
Stefan Weil
752779aaed Replace more PointerVector by std::vector for src/classify
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 12:27:48 +01:00
Stefan Weil
cac116dd11 Replace more PointerVector by std::vector for src/training
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 12:27:48 +01:00
Stefan Weil
dae5accceb Replace remaining PointerVector by std::vector for src/api
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 12:27:48 +01:00
Stefan Weil
9e006a8bbc Replace more GenericVector by std::vector for src/ccstruct
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 12:27:48 +01:00
Stefan Weil
65d882f96e Replace more GenericVector by std::vector for src/ccstruct
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 12:27:48 +01:00
Stefan Weil
8ed6dee8e9 Replace more GenericVector by std::vector for src/ccstruct
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 12:27:48 +01:00
Stefan Weil
abc22976e4 Replace remaining PointerVector by std::vector for src/api
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 12:27:48 +01:00
Egor Pugin
862251b4f7
Merge pull request #3342 from stweil/master
Suppress resolution warning if no resolution was given
2021-03-19 13:09:21 +03:00
Stefan Weil
7f11261076 Suppress resolution warning if no resolution was given
Tesseract reported confusing information for images without resolution:

    Warning: Invalid resolution 0 dpi. Using 70 instead.
    Estimating resolution as 642

The warning is also shown when the resolution is not used at all
when preparing data for training.

It is now suppressed when there is no resolution information
(resolution == 0).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-19 10:45:54 +01:00
Stefan Weil
52a82b4356 Fix new alert reported by LGTM
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 23:27:17 +01:00
Egor Pugin
dcedf8d912
Merge pull request #3341 from stweil/vector
Replace more GenericVector and PointerVector by std::vector
2021-03-19 00:19:38 +03:00
Stefan Weil
f33e80e2fb Replace remaining PointerVector by std::vector for src/lstm
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 20:14:40 +01:00
Stefan Weil
07d147d4a6 Replace more PointerVector by std::vector for src/textord
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 19:04:00 +01:00
Stefan Weil
b0e30bd247 Replace remaining PointerVector by std::vector for src/wordrec
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 18:56:08 +01:00
Stefan Weil
b62a86a93f Replace more GenericVector by std::vector for src/ccstruct
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 17:16:43 +01:00
Stefan Weil
177703c562 Replace more GenericVector by std::vector for src/ccstruct
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 16:46:56 +01:00
Stefan Weil
9e566de0f2 Remove unused classes WordFeature, FloatWordFeature
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 16:46:56 +01:00
Stefan Weil
7b92614efa Replace more GenericVector by std::vector for src/ccstruct
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 16:46:56 +01:00
Egor Pugin
d41755fd9b
Merge pull request #3340 from stweil/vector
Replace more GenericVector by std::vector
2021-03-18 18:23:25 +03:00
Stefan Weil
a584ee5ac0 Add missing include statement (fix CI build)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 15:59:58 +01:00
Stefan Weil
a39db7e581 Replace remaining GenericVector by std::vector for src/unittest
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 15:40:47 +01:00
Stefan Weil
619b98b73f Replace more GenericVector by std::vector for src/unittest
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 15:32:18 +01:00
Stefan Weil
48fe1e0232 Replace more GenericVector by std::vector for src/unittest
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 15:32:18 +01:00
Stefan Weil
9eab1d60c1 Replace more GenericVector by std::vector for src/ccutil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 15:04:56 +01:00
Stefan Weil
f8d55f30d8 Replace more GenericVector by std::vector for src/ccutil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 12:31:13 +01:00
Stefan Weil
d9739ba459 Replace more GenericVector by std::vector for src/ccutil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 12:27:37 +01:00
Stefan Weil
4b428df131 Replace more GenericVector by std::vector for src/ccutil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 12:18:49 +01:00
Stefan Weil
92e98a30e1 Replace more GenericVector by std::vector for src/ccutil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 12:04:22 +01:00
Stefan Weil
573e7d6bb9 Replace more GenericVector by std::vector
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 11:58:13 +01:00
Stefan Weil
a80689559b Partially revert "Replace more GenericVector by std::vector for src/ccutil"
This partially reverts and cleans commit 96d72298b12f744a72e5c3cea67924779e859e42
which had broken intfeaturemap_test.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 11:43:32 +01:00
Stefan Weil
576d8d6c63 Partially revert "Replace remaining GenericVector by std::vector for src/training"
This partially reverts commit 7df1cb0bab
which had broken lstm_squashed_test.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 10:59:07 +01:00
Egor Pugin
18017a1334
Merge pull request #3338 from stweil/vector
Replace more GenericVector by std::vector
2021-03-18 11:39:38 +03:00
Stefan Weil
77dbd3ee02 Remove two type casts
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 09:04:39 +01:00
Stefan Weil
7fdf79aff4 Move function ExtractFontName to baseapi.cpp
It is only used there, so now a local function.
This also allows removing blobclass.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 08:57:36 +01:00