diff --git a/src/training/commandlineflags.h b/src/training/commandlineflags.h index 8c78ede4c1..83ac32d853 100644 --- a/src/training/commandlineflags.h +++ b/src/training/commandlineflags.h @@ -63,13 +63,16 @@ #endif // Flags from commontraining.cpp +// Command line arguments for font_properties, xheights and unicharset. DECLARE_INT_PARAM_FLAG(debug_level); DECLARE_STRING_PARAM_FLAG(D); +DECLARE_STRING_PARAM_FLAG(F); DECLARE_STRING_PARAM_FLAG(O); DECLARE_STRING_PARAM_FLAG(U); DECLARE_STRING_PARAM_FLAG(X); DECLARE_STRING_PARAM_FLAG(fonts_dir); DECLARE_STRING_PARAM_FLAG(fontconfig_tmpdir); +DECLARE_STRING_PARAM_FLAG(output_trainer); DECLARE_STRING_PARAM_FLAG(test_ch); namespace tesseract { diff --git a/src/training/commontraining.cpp b/src/training/commontraining.cpp index d44f903458..2545aca7cc 100644 --- a/src/training/commontraining.cpp +++ b/src/training/commontraining.cpp @@ -93,11 +93,11 @@ INT_PARAM_FLAG(debug_level, 0, "Level of Trainer debugging"); static INT_PARAM_FLAG(load_images, 0, "Load images with tr files"); static STRING_PARAM_FLAG(configfile, "", "File to load more configs from"); STRING_PARAM_FLAG(D, "", "Directory to write output files to"); -static STRING_PARAM_FLAG(F, "font_properties", "File listing font properties"); +STRING_PARAM_FLAG(F, "font_properties", "File listing font properties"); STRING_PARAM_FLAG(X, "", "File listing font xheights"); STRING_PARAM_FLAG(U, "unicharset", "File to load unicharset from"); STRING_PARAM_FLAG(O, "", "File to write unicharset to"); -static STRING_PARAM_FLAG(output_trainer, "", "File to write trainer to"); +STRING_PARAM_FLAG(output_trainer, "", "File to write trainer to"); STRING_PARAM_FLAG(test_ch, "", "UTF8 test character string"); static DOUBLE_PARAM_FLAG(clusterconfig_min_samples_fraction, Config.MinSamples, "Min number of samples per proto as % of total"); diff --git a/unittest/mastertrainer_test.cc b/unittest/mastertrainer_test.cc index 90d22c7d48..1876379cb1 100644 --- a/unittest/mastertrainer_test.cc +++ b/unittest/mastertrainer_test.cc @@ -41,13 +41,6 @@ #include "commontraining.h" #include "tessopt.h" // tessoptind -// Commontraining command-line arguments for font_properties, xheights and -// unicharset. -DECLARE_STRING_PARAM_FLAG(F); -DECLARE_STRING_PARAM_FLAG(X); -DECLARE_STRING_PARAM_FLAG(U); -DECLARE_STRING_PARAM_FLAG(output_trainer); - // Specs of the MockClassifier. static const int kNumTopNErrs = 10; static const int kNumTop2Errs = kNumTopNErrs + 20;