Skip to content

Commit 57a6f1d

Browse files
committed
remove duplicate help from combine_lang_model
1 parent 6ee7f4e commit 57a6f1d

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

src/training/combine_lang_model.cpp

+9-18
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "unicharset_training_utils.h"
2424

2525
STRING_PARAM_FLAG(input_unicharset, "",
26-
"Unicharset to complete and use in encoding");
26+
"Filename with unicharset to complete and use in encoding");
2727
STRING_PARAM_FLAG(script_dir, "",
2828
"Directory name for input script unicharsets");
2929
STRING_PARAM_FLAG(words, "",
@@ -40,26 +40,17 @@ BOOL_PARAM_FLAG(pass_through_recoder, false,
4040
" unicharset. Otherwise, potentially a compression of it");
4141

4242
int main(int argc, char** argv) {
43+
// Sets properties on the input unicharset file, and writes:
44+
// rootdir/lang/lang.charset_size=ddd.txt
45+
// rootdir/lang/lang.traineddata
46+
// rootdir/lang/lang.unicharset
47+
// If the 3 word lists are provided, the dawgs are also added
48+
// to the traineddata file.
49+
// The output unicharset and charset_size files are just for
50+
// human readability.
4351
tesseract::CheckSharedLibraryVersion();
4452
tesseract::ParseCommandLineFlags(argv[0], &argc, &argv, true);
4553

46-
// Check validity of input flags.
47-
if (FLAGS_input_unicharset.empty() || FLAGS_script_dir.empty() ||
48-
FLAGS_output_dir.empty() || FLAGS_lang.empty()) {
49-
tprintf("Usage: %s --input_unicharset filename --script_dir dirname\n",
50-
argv[0]);
51-
tprintf(" --output_dir rootdir --lang lang [--lang_is_rtl]\n");
52-
tprintf(" [--words file --puncs file --numbers file]\n");
53-
tprintf("Sets properties on the input unicharset file, and writes:\n");
54-
tprintf("rootdir/lang/lang.charset_size=ddd.txt\n");
55-
tprintf("rootdir/lang/lang.traineddata\n");
56-
tprintf("rootdir/lang/lang.unicharset\n");
57-
tprintf("If the 3 word lists are provided, the dawgs are also added to");
58-
tprintf(" the traineddata file.\n");
59-
tprintf("The output unicharset and charset_size files are just for human");
60-
tprintf(" readability.\n");
61-
exit(1);
62-
}
6354
GenericVector<STRING> words, puncs, numbers;
6455
// If these reads fail, we get a warning message and an empty list of words.
6556
tesseract::ReadFile(FLAGS_words.c_str(), nullptr).split('\n', &words);

0 commit comments

Comments
 (0)