1 #ifndef MAIN_SAMPLEHYPS_INITPARAMOPTIONS_HPP 2 #define MAIN_SAMPLEHYPS_INITPARAMOPTIONS_HPP 7 namespace po = boost::program_options;
10 po::variables_map *vm ) {
12 po::options_description desc (
"Command-line/configuration file options" );
17 (
HifstConstants::kWordMap.c_str(), po::value<std::string>()->default_value(
""),
"word map for reference translations" )
19 "Indices of sentences to translate" )
21 "Read original lattice from [file]" )
23 po::value<std::string>()->default_value (
"-"),
26 po::value<unsigned>()->default_value (1),
"Number of hypotheses" )
29 "Sampling threshold alpha (see PRO paper)")
32 "Number of samples per source sentence to return")
37 po::value<std::string>()->default_value (
"stdarc"),
38 "Choose between stdarc, lexstdarc, and tuplearc (for the tropical sparse tuple arc semiring)")
40 "Tropic sparse tuple arc weights. " 41 "Comma-separated floats. This needs to be set when the option --semiring=tuplearc is chosen.")
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[])
std::string const kHifstSemiring
std::string const kNbestExtended
std::string const kBinaryTarget
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 kExternalTokenizer
std::string const kIntRefs
std::string const kDontNegate
std::string const kNSamples
std::string const kOutput
std::string const kRangeExtended
List of constants to be used both across program options and class runners.
std::string const kWordRefs
std::string const kRandomSeed
std::string const kWordMap
std::string const kNegativeExamples
std::string const kTupleArcWeights
std::string const kSparseFormat