mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-04 01:39:16 +08:00
Merge pull request #1953 from stweil/fix
lstmtraining: Remove dead code for purified model name
This commit is contained in:
commit
76cd80e1d7
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user