tesseract  4.0.0-1-g2a2b
unicharset_extractor.cpp File Reference
#include <cstdlib>
#include "boxread.h"
#include "commandlineflags.h"
#include "commontraining.h"
#include "genericvector.h"
#include "lang_model_helpers.h"
#include "normstrngs.h"
#include "strngs.h"
#include "unicharset.h"
#include "unicharset_training_utils.h"

Go to the source code of this file.

Namespaces

 tesseract
 

Functions

 STRING_PARAM_FLAG (output_unicharset, "unicharset", "Output file path")
 
 INT_PARAM_FLAG (norm_mode, 1, "Normalization mode: 1=Combine graphemes, " "2=Split graphemes, 3=Pure unicode")
 
int main (int argc, char **argv)
 

Function Documentation

◆ INT_PARAM_FLAG()

INT_PARAM_FLAG ( norm_mode  ,
,
"Normalization mode:  1 = Combine graphemes,
" "  2 = Split graphemes 
)

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 97 of file unicharset_extractor.cpp.

97  {
98  tesseract::CheckSharedLibraryVersion();
99  if (argc > 1) {
100  tesseract::ParseCommandLineFlags(argv[0], &argc, &argv, true);
101  }
102  if (argc < 2) {
103  tprintf(
104  "Usage: %s [--output_unicharset filename] [--norm_mode mode]"
105  " box_or_text_file [...]\n",
106  argv[0]);
107  tprintf("Where mode means:\n");
108  tprintf(" 1=combine graphemes (use for Latin and other simple scripts)\n");
109  tprintf(" 2=split graphemes (use for Indic/Khmer/Myanmar)\n");
110  tprintf(" 3=pure unicode (use for Arabic/Hebrew/Thai/Tibetan)\n");
111  tprintf("Reads box or plain text files to extract the unicharset.\n");
112  return EXIT_FAILURE;
113  }
114  return tesseract::Main(argc, argv);
115 }
void ParseCommandLineFlags(const char *usage, int *argc, char ***argv, const bool remove_flags)
DLLSYM void tprintf(const char *format,...)
Definition: tprintf.cpp:37

◆ STRING_PARAM_FLAG()

STRING_PARAM_FLAG ( output_unicharset  ,
"unicharset"  ,
"Output file path"   
)