23 namespace po = boost::program_options;
39 po::variables_map *vm ) {
41 po::options_description desc (
"Command-line/configuration file options" );
44 "Indices of sentences to translate" )
46 "Scaling factors applied to the language models" )
48 po::value<std::string>()->default_value (
"1.0" ),
49 "Scaling factors applied to the language models" )
51 "Scaling factors applied to the language models (separated by commas) " )
53 po::value<float>()->default_value ( 1.0f ),
54 "Scaling factors applied to the language models " )
56 po::value<std::string>()->default_value (
"byshortestpath,1" ),
57 "Choose between byshortestpath,numpaths or byweight,weight" )
63 po::value<std::string>()->default_value (
65 "Choose between lexstdarc or stdarc" )
69 LERROR (
"Language model file not defined" );
70 exit ( EXIT_FAILURE );
73 LERROR (
"Unimap model not defined" );
74 exit ( EXIT_FAILURE );
76 }
catch ( std::exception& e ) {
77 cerr <<
"error: " << e.what() <<
"\n";
78 exit ( EXIT_FAILURE );
80 cerr <<
"Exception of unknown type!\n";
81 exit ( EXIT_FAILURE );
83 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 kRecaserPrune
std::string const kRecaserUnimapLoad
std::string const kRecaserLmLoad
std::string const kRecaserOutputExtended
std::string const kRangeExtended
List of constants to be used both across program options and class runners.
std::string const kHifstSemiringStdArc
std::string const kRecaserUnimapWeight
std::string const kRecaserLmFeatureweight
std::string const kRecaserInputExtended
std::string const kHifstSemiringExtended