24 namespace po = boost::program_options;
40 po::variables_map *vm ) {
42 po::options_description desc (
"Command-line/configuration file options" );
45 po::value<std::string>()->default_value (
"1" ),
46 "Indices of sentences to translate" )
48 "Number of threads (trimmed to number of cpus in the machine) " )
50 "If set, the tool expects input FSAs to be templated over lexicographic<tropical,tropical> semiring (and so maps them to tropical)" )
52 "Load an FSA containing the evidence space" )
54 po::value<std::string>()->default_value (
"" ),
55 "Load an FSA containing the hypotheses space" )
57 po::value<std::string>()->default_value (
"" ),
58 "Write the lmbr FSA output with posteriors applied" )
60 po::value<std::string>()->default_value (
"" ),
61 "Write file text with one-best for tunings. Use %%alpha%% and %%wip%% outputs for different alphas and word penalties" )
63 po::value<unsigned>()->default_value ( 1 ),
"Minimum posterior order to apply" )
65 po::value<unsigned>()->default_value ( 4 ),
"Maximum posterior order to apply" )
67 po::value<std::string>()->default_value (
"1" ),
68 "Scaling factor of normalized evidence space (range of float values)" )
70 po::value<std::string>()->default_value (
"0.0" ),
71 "Word penalty (range of float values)" )
77 po::value<float>()->default_value ( std::numeric_limits<float>::max() ),
78 "Preprune evidence space" )
81 }
catch ( std::exception& e ) {
82 cerr <<
"error: " << e.what() <<
"\n";
83 exit ( EXIT_FAILURE );
85 cerr <<
"Exception of unknown type!\n";
86 exit ( EXIT_FAILURE );
88 LINFO (
"Configuration loaded" );
void parseOptionsGeneric(bpo::options_description &desc, bpo::variables_map *vm, int argc, const char *argv[])
const std::string kLmbrAlpha
const std::string kLmbrLoadHypothesesspace
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...
const std::string kLmbrLexstdarc
const std::string kLmbrWritedecoder
const std::string kLmbrPreprune
std::string const kRangeExtended
List of constants to be used both across program options and class runners.
const std::string kLmbrLoadEvidencespace
const std::string kLmbrMaxorder
const std::string kNThreads
const std::string kLmbrMinorder
const std::string kLmbrWriteonebest
const std::string kLmbrWps