1 #ifndef MAIN_LMERT_INITPARAMOPTIONS_HPP 2 #define MAIN_LMERT_INITPARAMOPTIONS_HPP 7 namespace po = boost::program_options;
13 po::variables_map *vm ) {
16 po::options_description desc (
"Command-line/configuration file options" );
19 "Indices of tuning set sentences" )
21 "Fst(s) to count strings (use ? for multiple instances) " )
23 "Initial parameter value (lambda)" )
24 (
kLmertWordRefs.c_str(), po::value<std::string>(),
"MERT reference translations words" )
25 (
kLmertIntRefs.c_str(), po::value<std::string>(),
"MERT reference translations ints" )
26 (
kLmertMinGamma.c_str(), po::value<float>()->default_value ( 0.000005f ),
27 "minimum gamma value for a line segment" )
29 "minimum accepted bleu gain (stopping criterion)" )
31 "seed for randomline search" )
32 (
kNThreads.c_str() , po::value<int>()->default_value ( 1 ),
"number of threads" )
34 "number of random directions; default is 2xfeature_dim" )
37 (
kLmertWMap.c_str(), po::value<std::string>(),
"Maps idx to word; for use with word references" )
38 (
kLmertBleuCacheSize.c_str(), po::value<int>()->default_value(10000),
"number of hyps per sentence for which to LRU cache Bleu stats");
47 }
catch ( std::exception& e ) {
48 cerr <<
"error: " << e.what() <<
"\n";
49 exit ( EXIT_FAILURE );
51 cerr <<
"Exception of unknown type!\n";
52 exit ( EXIT_FAILURE );
55 LINFO (
"Configuration loaded" );
void parseOptionsGeneric(bpo::options_description &desc, bpo::variables_map *vm, int argc, const char *argv[])
std::string const kLmertWordRefs
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 kRangeExtended
List of constants to be used both across program options and class runners.
std::string const kLmertRandomSeed
std::string const kLmertWMap
const std::string kNThreads
std::string const kLmertMinBleuGain
std::string const kLmertNumRandomDirections
std::string const kInputExtended
std::string const kLmertIntRefs
std::string const kLmertMinGamma
std::string const kLmertInitialParams
std::string const kLmertWriteParams
std::string const kLmertBleuCacheSize
std::string const kLmertExternalTokenizer