1 #ifndef MAIN_NWCP_INITPARAMOPTIONS_HPP 2 #define MAIN_NWCP_INITPARAMOPTIONS_HPP 12 namespace po = boost::program_options;
28 po::variables_map *vm ) {
30 po::options_description desc (
"Command-line/configuration file options" );
33 "Indices of sentences to translate" )
35 po::value<std::string>()->default_value (
"-"),
36 "Read original lattice from [file]" )
38 po::value<std::string>()->default_value (
"-"),
"Write result" )
40 po::value<std::string>()->default_value (
"projectweight2"),
41 "Action to perform. Choose between projectweight2 (default), std2lex, lex2std" )
44 }
catch ( std::exception& e ) {
45 cerr <<
"error: " << e.what() <<
"\n";
46 exit ( EXIT_FAILURE );
48 cerr <<
"Exception of unknown type!\n";
49 exit ( EXIT_FAILURE );
51 LINFO (
"Configuration loaded" );
void parseOptionsGeneric(bpo::options_description &desc, bpo::variables_map *vm, int argc, const char *argv[])
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 kRangeExtended
List of constants to be used both across program options and class runners.
std::string const kAction
std::string const kInputExtended