Skip to content
Snippets Groups Projects
Commit fa3f47ec authored by Franck Dary's avatar Franck Dary
Browse files

Added missing arguments to macaon_decode

parent d0530fcd
Branches
No related tags found
No related merge requests found
......@@ -37,6 +37,11 @@ po::options_description getOptionsDescription()
opt.add_options()
("help,h", "Produce this help message")
("debug,d", "Print infos on stderr")
("dicts", po::value<std::string>()->default_value(""),
"The .dict file describing all the dictionaries to be used in the experiement. By default the filename specified in the .tm file will be used")
("featureModels", po::value<std::string>()->default_value(""),
"For each classifier, specify what .fm (feature model) file to use. By default the filename specified in the .cla file will be used. Example : --featureModel Parser=parser.fm,Tagger=tagger.fm")
("printEntropy", "Print entropy for each sequence")
("sequenceDelimiterTape", po::value<std::string>()->default_value("EOS"),
"The name of the buffer's tape that contains the delimiter token for a sequence")
......@@ -106,11 +111,27 @@ int main(int argc, char * argv[])
ProgramParameters::input = vm["input"].as<std::string>();
ProgramParameters::mcdName = vm["mcd"].as<std::string>();
ProgramParameters::debug = vm.count("debug") == 0 ? false : true;
ProgramParameters::dicts = vm["dicts"].as<std::string>();
ProgramParameters::printEntropy = vm.count("printEntropy") == 0 ? false : true;
ProgramParameters::lang = vm["lang"].as<std::string>();
ProgramParameters::sequenceDelimiterTape = vm["sequenceDelimiterTape"].as<std::string>();
ProgramParameters::sequenceDelimiter = vm["sequenceDelimiter"].as<std::string>();
ProgramParameters::showFeatureRepresentation = vm["showFeatureRepresentation"].as<int>();
std::string featureModels = vm["featureModels"].as<std::string>();
if (!featureModels.empty())
{
auto byClassifiers = split(featureModels, ',');
for (auto & classifier : byClassifiers)
{
auto parts = split(classifier, '=');
if (parts.size() != 2)
{
fprintf(stderr, "ERROR (%s) : wrong format for argument of option featureModels. Aborting.\n", ERRINFO);
exit(1);
}
ProgramParameters::featureModelByClassifier[parts[0]] = parts[1];
}
}
const char * MACAON_DIR = std::getenv("MACAON_DIR");
std::string slash = "/";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment