Merge pull request #1953 from stweil/fix

lstmtraining: Remove dead code for purified model name
This commit is contained in:
zdenop 2018-10-06 15:02:39 +02:00 committed by GitHub
commit 76cd80e1d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,6 @@ const int kNumPagesPerBatch = 100;
int main(int argc, char **argv) {
tesseract::CheckSharedLibraryVersion();
ParseArguments(&argc, &argv);
// Purify the model name in case it is based on the network string.
if (FLAGS_model_output.empty()) {
tprintf("Must provide a --model_output!\n");
return EXIT_FAILURE;
@ -82,13 +81,6 @@ int main(int argc, char **argv) {
tprintf("Must provide a --traineddata see training wiki\n");
return EXIT_FAILURE;
}
STRING model_output = FLAGS_model_output.c_str();
for (int i = 0; i < model_output.length(); ++i) {
if (model_output[i] == '[' || model_output[i] == ']')
model_output[i] = '-';
if (model_output[i] == '(' || model_output[i] == ')')
model_output[i] = '_';
}
// Check write permissions.
STRING test_file = FLAGS_model_output.c_str();