Skip to content
Snippets Groups Projects
Select Git revision
  • 6b8a17da0a37333dc1917e4ee7ce4e64090954b1
  • master default
  • object
  • develop protected
  • private_algos
  • cuisine
  • SMOTE
  • revert-76c4cca5
  • archive protected
  • no_graphviz
  • 0.0.2
  • 0.0.1
12 results

WeightedLinear.py

Blame
  • macaon_decode.cpp 7.15 KiB
    /// @file macaon_decode.cpp
    /// @author Franck Dary
    /// @version 1.0
    /// @date 2018-08-07
    
    #include <cstdio>
    #include <cstdlib>
    #include <boost/program_options.hpp>
    #include "BD.hpp"
    #include "Config.hpp"
    #include "TransitionMachine.hpp"
    #include "Decoder.hpp"
    
    namespace po = boost::program_options;
    
    /// @brief Get the list of mandatory and optional program arguments.
    ///
    /// @return The lists.
    po::options_description getOptionsDescription()
    {
      po::options_description desc("Command-Line Arguments ");
    
      po::options_description req("Required");
      req.add_options()
        ("expName", po::value<std::string>()->required(),
          "Name of this experiment")
        ("tm", po::value<std::string>()->required(),
          "File describing the Tape Machine to use")
        ("bd", po::value<std::string>()->required(),
          "BD file that describes the multi-tapes buffer")
        ("mcd", po::value<std::string>()->required(),
          "MCD file that describes the input")
        ("input,I", po::value<std::string>()->required(),
          "Input file formated according to the mcd");
    
      po::options_description opt("Optional");
      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")
        ("sequenceDelimiter", po::value<std::string>()->default_value("1"),
          "The value of the token that act as a delimiter for sequences")
        ("tapeSize", po::value<int>()->default_value(100000),
          "Number of lines in the input file.")
        ("showFeatureRepresentation", po::value<int>()->default_value(0),
          "For each state of the Config, show its feature representation")
        ("interactive", po::value<bool>()->default_value(true),
          "Is the shell interactive ? Display advancement informations")
        ("lang", po::value<std::string>()->default_value("fr"),
          "Language you are working with");
    
      po::options_description analysis("Error analysis related options");
      analysis.add_options()
        ("errorAnalysis", "Print an analysis of errors")
        ("meanEntropy", "Print the mean entropy for error types")
        ("onlyPrefixes", "Only uses the prefixes of error categories")
        ("nbErrorsToShow", po::value<int>()->default_value(10),
          "Display only the X most common errors")
        ("classifier", po::value<std::string>()->default_value(""),
          "Name of the monitored classifier, if not specified monitor everyone");
    
      po::options_description beam("Beam search related options");
      beam.add_options()