23 namespace po = boost::program_options;
39 po::variables_map *vm ) {
42 po::options_description desc (
"Command-line/configuration file options" );
45 "Indices of sentences handle" )
47 "Determinize on output (i.e. assuming tags are on input side)")
48 (
kMinimize.c_str(), po::value<std::string>()->default_value(
"no"),
49 "Determinize AND minimize (AND also push). This is an EXPERIMENTAL feature.")
51 "Exit immediately if first pass fails to position correctly the tags")
52 (
kUseOpenFst.c_str(), po::value<std::string>()->default_value(
"no"),
53 "Use OpenFst determinize for non-functional fsts (openfst 1.4.1/1.5.0)")
55 "Fst(s) to determinize. Keeps best derivation. (use ? for multiple instances) " )
57 "Determinized Fsts (use ? for multiple instances )" )
59 po::value<std::string>()->default_value (
"stdarc"),
60 "Choose between stdarc, lexstdarc,... (only stdarc supported!")
61 (
kNThreads.c_str(), po::value<unsigned>(),
62 "Number of threads (trimmed to number of cpus in the machine) " )
65 }
catch ( std::exception& e ) {
66 cerr <<
"error: " << e.what() <<
"\n";
67 exit ( EXIT_FAILURE );
69 cerr <<
"Exception of unknown type!\n";
70 exit ( EXIT_FAILURE );
72 LINFO (
"Configuration loaded" );
void parseOptionsGeneric(bpo::options_description &desc, bpo::variables_map *vm, int argc, const char *argv[])
std::string const kHifstSemiring
void init_param_options(int argc, const char *argv[], po::variables_map *vm)
Function to initialize boost program_options module with command-line and config file options...
std::string const kOutputExtended
std::string const kExitOnFirstPassFailure
std::string const kRangeExtended
List of constants to be used both across program options and class runners.
std::string const kDeterminizeOutput
const std::string kNThreads
std::string const kInputExtended
std::string const kUseOpenFst
std::string const kMinimize