tesseract  4.0.0-1-g2a2b
set_unicharset_properties.cpp File Reference
#include "commandlineflags.h"
#include "commontraining.h"
#include "tprintf.h"
#include "unicharset_training_utils.h"

Go to the source code of this file.

Functions

 STRING_PARAM_FLAG (script_dir, "", "Directory name for input script unicharsets/xheights")
 
 DECLARE_STRING_PARAM_FLAG (U)
 
 DECLARE_STRING_PARAM_FLAG (O)
 
 DECLARE_STRING_PARAM_FLAG (X)
 
int main (int argc, char **argv)
 

Function Documentation

◆ DECLARE_STRING_PARAM_FLAG() [1/3]

DECLARE_STRING_PARAM_FLAG ( )

◆ DECLARE_STRING_PARAM_FLAG() [2/3]

DECLARE_STRING_PARAM_FLAG ( )

◆ DECLARE_STRING_PARAM_FLAG() [3/3]

DECLARE_STRING_PARAM_FLAG ( )

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 29 of file set_unicharset_properties.cpp.

29  {
30  tesseract::CheckSharedLibraryVersion();
31  tesseract::ParseCommandLineFlags(argv[0], &argc, &argv, true);
32 
33  // Check validity of input flags.
34  if (FLAGS_U.empty() || FLAGS_O.empty()) {
35  tprintf("Specify both input and output unicharsets!\n");
36  exit(1);
37  }
38  if (FLAGS_script_dir.empty()) {
39  tprintf("Must specify a script_dir!\n");
40  exit(1);
41  }
42 
43  tesseract::SetPropertiesForInputFile(FLAGS_script_dir.c_str(),
44  FLAGS_U.c_str(), FLAGS_O.c_str(),
45  FLAGS_X.c_str());
46  return 0;
47 }
void ParseCommandLineFlags(const char *usage, int *argc, char ***argv, const bool remove_flags)
DLLSYM void tprintf(const char *format,...)
Definition: tprintf.cpp:37
void SetPropertiesForInputFile(const std::string &script_dir, const std::string &input_unicharset_file, const std::string &output_unicharset_file, const std::string &output_xheights_file)

◆ STRING_PARAM_FLAG()

STRING_PARAM_FLAG ( script_dir  ,
""  ,
"Directory name for input script unicharsets/xheights"   
)