101 {
102 tesseract::CheckSharedLibraryVersion();
104 std::string file_prefix;
107
109 InitializeClassifier(FLAGS_classifier.c_str(), trainer->unicharset(), argc, argv, &api);
110 if (shape_classifier == nullptr) {
111 fprintf(stderr, "Classifier init failed!:%s\n", FLAGS_classifier.c_str());
112 return EXIT_FAILURE;
113 }
114
115
116
117
118 trainer->ReplicateAndRandomizeSamplesIfRequired();
119
121 std::max(3, static_cast<int>(FLAGS_debug_level)), false,
122 shape_classifier, nullptr);
123 delete shape_classifier;
124 delete api;
125
126 return EXIT_SUCCESS;
127}
void ParseArguments(int *argc, char ***argv)
std::unique_ptr< MasterTrainer > LoadTrainingData(const char *const *filelist, bool replication, ShapeTable **shape_table, std::string &file_prefix)