25 namespace po = boost::program_options;
41 , po::variables_map *vm ) {
45 po::options_description desc (
"Command-line/configuration file options" );
48 (
kRange.c_str(), po::value<string>(),
49 "Indices of lattices to rescore" )
51 "Number of threads (trimmed to number of cpus in the machine) " )
53 "Read original lattice from [file]" )
55 "If working on LexStd, then delete lm cost in the lattices first," 56 " by projecting Weight2 into Weight1." )
58 po::value<string>()->default_value (
"" ),
59 "Write lattice with lm scores to [file]" )
61 , po::value<string>()->default_value(
"no")
62 ,
"Use bilingual models. Only nplm model supported" 65 , po::value<unsigned>()->default_value(3)
66 ,
"Source size. Only 0 or positive odd values accepted. " 67 "NPLM model must be trained accordingly! If 0, it will assume NNLM. " 68 "Note that 0 is intended to use only for debugging purposes -- this should be equivalent to " 69 "(but slower than) --usebilm=no." 72 , po::value<string>()->default_value(
"")
73 ,
"Single file containing source sentences. Mandatory if " 74 "bilingual models are used!" 77 , po::value<string>()->default_value(
"no")
78 ,
"Dumps 1-best hypotheses for different word penalty corrections" 81 , po::value<string>()->default_value(
"")
82 ,
"Where to write 1-best output per word penalty correction (use %%wp%%)" 85 , po::value<string>()->default_value(
"")
86 ,
"Range of word penalties in usual range format (float values)." 89 , po::value<string>()->default_value
91 ,
"Choose between lexstdarc or stdarc" )
93 , po::value<string>()->default_value (
"" )
94 ,
"Write speed stats to [file]" )
98 }
catch ( exception& e ) {
99 cerr <<
"error: " << e.what() <<
"\n";
100 exit ( EXIT_FAILURE );
102 cerr <<
"Exception of unknown type!\n";
103 exit ( EXIT_FAILURE );
105 LINFO (
"Configuration loaded" );
void parseOptionsGeneric(bpo::options_description &desc, bpo::variables_map *vm, int argc, const char *argv[])
std::string const kHifstSemiring
std::string const kUseBilingualModelSourceSentenceFile
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 kUseBilingualModel
std::string const kLatticeStore
std::string const kLatticeLoadDeleteLmCost
std::string const kHifstSemiringStdArc
std::string const kTuneWrite
const std::string kNThreads
std::string const kLatticeLoad
To initialize boost parameter options.
void checkApplyLmOptions(po::variables_map *vm)
void initCommonApplylmOptions(po::options_description &desc)
std::string const kTuneWordPenaltyRange
std::string const kStatsWrite
std::string const kUseBilingualModelSourceSize