From 0c5995568f203009866864c38cf8d1bb11398ca2 Mon Sep 17 00:00:00 2001 From: zdenop Date: Mon, 11 Nov 2019 22:22:31 +0100 Subject: [PATCH] fix ABI compatibility (move training files back to 4.1.0 location) --- src/classify/Makefile.am | 8 ++++++++ src/{training => classify}/intfeaturedist.cpp | 0 src/{training => classify}/intfeaturedist.h | 0 src/{training => classify}/intfeaturemap.cpp | 0 src/{training => classify}/intfeaturemap.h | 0 src/{training => classify}/sampleiterator.cpp | 0 src/{training => classify}/sampleiterator.h | 0 src/{training => classify}/trainingsampleset.cpp | 0 src/{training => classify}/trainingsampleset.h | 0 src/lstm/Makefile.am | 12 ++++++------ src/{training => lstm}/ctc.cpp | 0 src/{training => lstm}/ctc.h | 0 src/{training => lstm}/lstmtrainer.cpp | 0 src/{training => lstm}/lstmtrainer.h | 0 src/{training => lstm}/networkbuilder.cpp | 0 src/{training => lstm}/networkbuilder.h | 0 src/training/CMakeLists.txt | 14 -------------- src/training/Makefile.am | 14 -------------- 18 files changed, 14 insertions(+), 34 deletions(-) rename src/{training => classify}/intfeaturedist.cpp (100%) rename src/{training => classify}/intfeaturedist.h (100%) rename src/{training => classify}/intfeaturemap.cpp (100%) rename src/{training => classify}/intfeaturemap.h (100%) rename src/{training => classify}/sampleiterator.cpp (100%) rename src/{training => classify}/sampleiterator.h (100%) rename src/{training => classify}/trainingsampleset.cpp (100%) rename src/{training => classify}/trainingsampleset.h (100%) rename src/{training => lstm}/ctc.cpp (100%) rename src/{training => lstm}/ctc.h (100%) rename src/{training => lstm}/lstmtrainer.cpp (100%) rename src/{training => lstm}/lstmtrainer.h (100%) rename src/{training => lstm}/networkbuilder.cpp (100%) rename src/{training => lstm}/networkbuilder.h (100%) diff --git a/src/classify/Makefile.am b/src/classify/Makefile.am index 85422828..0ad9e816 100644 --- a/src/classify/Makefile.am +++ b/src/classify/Makefile.am @@ -25,6 +25,8 @@ noinst_HEADERS += clusttool.h noinst_HEADERS += featdefs.h noinst_HEADERS += float2int.h noinst_HEADERS += fpoint.h +noinst_HEADERS += intfeaturedist.cpp +noinst_HEADERS += intfeaturemap.cpp noinst_HEADERS += intfeaturespace.h noinst_HEADERS += intfx.h noinst_HEADERS += intmatcher.h @@ -40,10 +42,12 @@ noinst_HEADERS += ocrfeatures.h noinst_HEADERS += outfeat.h noinst_HEADERS += picofeat.h noinst_HEADERS += protos.h +noinst_HEADERS += sampleiterator.h noinst_HEADERS += shapeclassifier.h noinst_HEADERS += shapetable.h noinst_HEADERS += tessclassifier.h noinst_HEADERS += trainingsample.h +noinst_HEADERS += trainingsampleset.h endif noinst_LTLIBRARIES = libtesseract_classify.la @@ -60,6 +64,8 @@ libtesseract_classify_la_SOURCES += cutoffs.cpp libtesseract_classify_la_SOURCES += featdefs.cpp libtesseract_classify_la_SOURCES += float2int.cpp libtesseract_classify_la_SOURCES += fpoint.cpp +libtesseract_classify_la_SOURCES += intfeaturedist.cpp +libtesseract_classify_la_SOURCES += intfeaturemap.cpp libtesseract_classify_la_SOURCES += intfeaturespace.cpp libtesseract_classify_la_SOURCES += intfx.cpp libtesseract_classify_la_SOURCES += intmatcher.cpp @@ -75,8 +81,10 @@ libtesseract_classify_la_SOURCES += ocrfeatures.cpp libtesseract_classify_la_SOURCES += outfeat.cpp libtesseract_classify_la_SOURCES += picofeat.cpp libtesseract_classify_la_SOURCES += protos.cpp +libtesseract_classify_la_SOURCES += sampleiterator.cpp libtesseract_classify_la_SOURCES += shapeclassifier.cpp libtesseract_classify_la_SOURCES += shapetable.cpp libtesseract_classify_la_SOURCES += tessclassifier.cpp libtesseract_classify_la_SOURCES += trainingsample.cpp +libtesseract_classify_la_SOURCES += trainingsampleset.cpp endif diff --git a/src/training/intfeaturedist.cpp b/src/classify/intfeaturedist.cpp similarity index 100% rename from src/training/intfeaturedist.cpp rename to src/classify/intfeaturedist.cpp diff --git a/src/training/intfeaturedist.h b/src/classify/intfeaturedist.h similarity index 100% rename from src/training/intfeaturedist.h rename to src/classify/intfeaturedist.h diff --git a/src/training/intfeaturemap.cpp b/src/classify/intfeaturemap.cpp similarity index 100% rename from src/training/intfeaturemap.cpp rename to src/classify/intfeaturemap.cpp diff --git a/src/training/intfeaturemap.h b/src/classify/intfeaturemap.h similarity index 100% rename from src/training/intfeaturemap.h rename to src/classify/intfeaturemap.h diff --git a/src/training/sampleiterator.cpp b/src/classify/sampleiterator.cpp similarity index 100% rename from src/training/sampleiterator.cpp rename to src/classify/sampleiterator.cpp diff --git a/src/training/sampleiterator.h b/src/classify/sampleiterator.h similarity index 100% rename from src/training/sampleiterator.h rename to src/classify/sampleiterator.h diff --git a/src/training/trainingsampleset.cpp b/src/classify/trainingsampleset.cpp similarity index 100% rename from src/training/trainingsampleset.cpp rename to src/classify/trainingsampleset.cpp diff --git a/src/training/trainingsampleset.h b/src/classify/trainingsampleset.h similarity index 100% rename from src/training/trainingsampleset.h rename to src/classify/trainingsampleset.h diff --git a/src/lstm/Makefile.am b/src/lstm/Makefile.am index 85d67fa6..0a367db3 100644 --- a/src/lstm/Makefile.am +++ b/src/lstm/Makefile.am @@ -30,10 +30,10 @@ endif pkginclude_HEADERS = -noinst_HEADERS = convolve.h +noinst_HEADERS = convolve.h ctc.h noinst_HEADERS += fullyconnected.h functions.h input.h -noinst_HEADERS += lstm.h lstmrecognizer.h maxpool.h -noinst_HEADERS += network.h networkio.h networkscratch.h +noinst_HEADERS += lstm.h lstmrecognizer.h lstmtrainer.h maxpool.h +noinst_HEADERS += network.h networkbuilder.h networkio.h networkscratch.h noinst_HEADERS += parallel.h plumbing.h recodebeam.h reconfig.h reversed.h noinst_HEADERS += series.h static_shape.h stridemap.h noinst_HEADERS += tfnetwork.h weightmatrix.h @@ -41,9 +41,9 @@ noinst_HEADERS += tfnetwork.h weightmatrix.h noinst_LTLIBRARIES = libtesseract_lstm.la libtesseract_lstm_la_SOURCES = \ - convolve.cpp fullyconnected.cpp functions.cpp input.cpp \ - lstm.cpp lstmrecognizer.cpp maxpool.cpp \ - network.cpp networkio.cpp \ + convolve.cpp ctc.cpp fullyconnected.cpp functions.cpp input.cpp \ + lstm.cpp lstmrecognizer.cpp lstmtrainer.cpp maxpool.cpp \ + network.cpp networkbuilder.cpp networkio.cpp \ parallel.cpp plumbing.cpp recodebeam.cpp reconfig.cpp reversed.cpp \ series.cpp stridemap.cpp tfnetwork.cpp weightmatrix.cpp diff --git a/src/training/ctc.cpp b/src/lstm/ctc.cpp similarity index 100% rename from src/training/ctc.cpp rename to src/lstm/ctc.cpp diff --git a/src/training/ctc.h b/src/lstm/ctc.h similarity index 100% rename from src/training/ctc.h rename to src/lstm/ctc.h diff --git a/src/training/lstmtrainer.cpp b/src/lstm/lstmtrainer.cpp similarity index 100% rename from src/training/lstmtrainer.cpp rename to src/lstm/lstmtrainer.cpp diff --git a/src/training/lstmtrainer.h b/src/lstm/lstmtrainer.h similarity index 100% rename from src/training/lstmtrainer.h rename to src/lstm/lstmtrainer.h diff --git a/src/training/networkbuilder.cpp b/src/lstm/networkbuilder.cpp similarity index 100% rename from src/training/networkbuilder.cpp rename to src/lstm/networkbuilder.cpp diff --git a/src/training/networkbuilder.h b/src/lstm/networkbuilder.h similarity index 100% rename from src/training/networkbuilder.h rename to src/lstm/networkbuilder.h diff --git a/src/training/CMakeLists.txt b/src/training/CMakeLists.txt index 15731ede..6fbf742f 100644 --- a/src/training/CMakeLists.txt +++ b/src/training/CMakeLists.txt @@ -76,22 +76,10 @@ set(common_training_src commandlineflags.h commontraining.cpp commontraining.h - ctc.cpp - ctc.h errorcounter.cpp errorcounter.h - intfeaturedist.cpp - intfeaturedist.h - intfeaturemap.cpp - intfeaturemap.h mastertrainer.cpp mastertrainer.h - networkbuilder.cpp - networkbuilder.h - sampleiterator.cpp - sampleiterator.h - trainingsampleset.cpp - trainingsampleset.h ) add_library (common_training ${common_training_src}) target_link_libraries (common_training libtesseract tessopt) @@ -197,8 +185,6 @@ set(unicharset_training_src lang_model_helpers.h lstmtester.cpp lstmtester.h - lstmtrainer.cpp - lstmtrainer.h normstrngs.cpp normstrngs.h unicharset_training_utils.cpp diff --git a/src/training/Makefile.am b/src/training/Makefile.am index a91bd0e1..f1e4f6cf 100644 --- a/src/training/Makefile.am +++ b/src/training/Makefile.am @@ -32,15 +32,12 @@ noinst_HEADERS = \ boxchar.h \ commandlineflags.h \ commontraining.h \ - ctc.h \ degradeimage.h \ icuerrorcode.h \ fileio.h \ lang_model_helpers.h \ ligature_table.h \ lstmtester.h \ - lstmtrainer.h \ - networkbuilder.h \ normstrngs.h \ pango_font_info.h \ stringrenderer.h \ @@ -57,12 +54,8 @@ noinst_HEADERS = \ if !DISABLED_LEGACY_ENGINE noinst_HEADERS += errorcounter.h - noinst_HEADERS += intfeaturedist.h - noinst_HEADERS += intfeaturemap.h noinst_HEADERS += mastertrainer.h noinst_HEADERS += mergenf.h - noinst_HEADERS += sampleiterator.h - noinst_HEADERS += trainingsampleset.h endif @@ -76,15 +69,12 @@ libtesseract_training_la_SOURCES = \ boxchar.cpp \ commandlineflags.cpp \ commontraining.cpp \ - ctc.cpp \ degradeimage.cpp \ icuerrorcode.cpp \ fileio.cpp \ lang_model_helpers.cpp \ ligature_table.cpp \ lstmtester.cpp \ - lstmtrainer.cpp \ - networkbuilder.cpp \ normstrngs.cpp \ pango_font_info.cpp \ stringrenderer.cpp \ @@ -99,11 +89,7 @@ libtesseract_training_la_SOURCES = \ if !DISABLED_LEGACY_ENGINE libtesseract_training_la_SOURCES += errorcounter.cpp -libtesseract_training_la_SOURCES += intfeaturedist.cpp -libtesseract_training_la_SOURCES += intfeaturemap.cpp libtesseract_training_la_SOURCES += mastertrainer.cpp -libtesseract_training_la_SOURCES += sampleiterator.cpp -libtesseract_training_la_SOURCES += trainingsampleset.cpp endif libtesseract_tessopt_la_SOURCES = \