return cmdOpt{
  program_name = string.basename(arg[0]),
  argument_description = "",
  main_description = "HMM/ANN recognition with April toolkit",
  {
    index_name="defopt",
    description="Load configuration file (a lua tabla)",
    short="f",
    argument="yes",
  },
  {
    index_name="server",
    description="Execute in server mode, listening in the specified port. The server receives the parameters vector.",
    long="server",
    argument="yes",
  },
  { index_name="bunch_size",
    description="Size of bunch for MLPs",
    long="bunch-size",
    argument="yes",
  },
  {
    index_name="one_step",
    description="One step algorithm [default='no']",
    long="one-step",
    argument="yes",
  },
  { index_name="n",
    description = "MLP file",
    short    = "n",
    argument = "yes",
  },
  {
    index_name="m",
    description = "hmms file",
    short = "m",
    argument = "yes",
  },
  {
    index_name="hmmdefs",
    description = "hmms HTK file",
    long = "hmmdefs",
    argument = "yes",
  },
  { index_name="t",
    description = "HTK unit's tied list",
    short = "t",
    argument = "yes",
  },
  { index_name="d",
    description = "HTK dictionary",
    short = "d",
    argument = "yes",
  },
  { index_name="optsil",
    description = "Use optional silence at begin and end of a sentence [default='no']",
    long = "optsil",
    argument = "yes",
  },
  { index_name="beginsil",
    description = "Use optional silence at begin of a sentence [default='no']",
    long = "beginsil",
    argument = "yes",
  },
  { index_name="endsil",
    description = "Use optional silence at end of a sentence [default='no']",
    long = "endsil",
    argument = "yes",
  },
  { index_name="wordsil",
    description = "Add optional silence between words [default='no']",
    long = "wordsil",
    argument = "yes",
  },
  { index_name="nested",
    description = "Parallelize emission evaluation and step viterbi when compiled with openmp [default='no']",
    long = "nested",
    argument = "yes",
  },
  { index_name="p",
    description = "File with the corpus mfccs data",
    short = "p",
    argument = "yes",
  },
  { index_name="input_lattice",
    description = "File with an input lattices list",
    long = "input-lattice",
    argument = "yes",
  },
  { index_name="use_input_lat_lm_score",
    description = "Force to use the input lattice LM scores [default='no']",
    long = "use-input-lat-lm-score",
    argument = "yes",
  },
  { index_name="input_lat_log_base",
    description="Base of the logarithms in lattices [default=exp(1)]",
    long="input-lat-log-base",
    argument="yes",
  },
  { index_name="prep",
    description = "File with the corpus preprocessed data",
    long = "prep",
    argument = "yes",
  },
  { index_name="txt",
    description = "File with the corpus transcriptions",
    long = "txt",
    argument = "yes",
  },
  { index_name="ose_file",
    description = "Over SEgmenter index file, with one string for each corpus file [optional]",
    long = "ose-file",
    argument = "yes",
  },
  { index_name="lm",
    description = "Language model [default=dont use LM]",
    long = "lm",
    argument = "yes",
  },
  { index_name="ngram_nstates",
    description = "Number of max states for ngram parser pruning [default=10000]",
    long = "ngram-nstates",
    argument = "yes",
  },
  { index_name="ngram_beam",
    description = "Beam for ngram parser pruning [default=2000]",
    long = "ngram-beam",
    argument = "yes",
  },
  { index_name="ngram_size",
    description = "Histogram size for ngram parser pruning [default=400]",
    long = "ngram-size",
    argument = "yes",
  },
  { index_name="viterbim_size",
    description = "Vector size for viterbi_m decoders",
    long = "viterbim-size",
    argument = "yes",
  },
  { index_name="wgen_nstates",
    description = "Number of max states for wgen pruning [default=4000, one-step=no]",
    long = "wgen-nstates",
    argument = "yes",
  },
  { index_name="wgen_beam",
    description = "Beam for wgen pruning [default=1000, one-step=no]",
    long = "wgen-beam",
    argument = "yes",
  },
  { index_name="wgen_size",
    description = "Histogram size for wgen parser pruning [default=200, one-step=no]",
    long = "wgen-size",
    argument = "yes",
  },
  { index_name="gsf",
    description = "Grammar Scale Factor [default=10]",
    long = "gsf",
    argument = "yes",
  },
  { index_name="wip",
    description = "Word Insertion Penalty [default=0]",
    long = "wip",
    argument = "yes",
  },
  { index_name="seg",
    description="Save segmentation [default=no]",
    long="seg",
    argumento="yes"
  },
  { index_name="save_input_wg",
    description="Save the acoustic/optic word_graph filtered with the NBest",
    long="save-input-wg",
    argument="yes",
  },
  { index_name="dog",
    description = "DOG or DAF :-) the Oversegmenter is always dummy",
    long     = "dog",
    argument = "yes",
  },
  {
    index_name  = "use_word_probs",
    description = "Use probs. stored in dictionary [default='yes']",
    long        = "use-word-probs",
    argument    = "yes"
  },
  {
    index_name  = "apply_gsf_word_probs",
    description = "Apply GSF to word probs [default='no']",
    long        = "apply-gsf-word-probs",
    argument    = "yes"
  },
  {
    index_name  = "context",
    description = "Size of ann context [default=4]",
    long        = "context",
    argument    = "yes"
  },
  {
    index_name  = "filter",
    description = "Fiter output sentence before tasas, is a file that return a LUA function [default=nil]",
    long        = "filter",
    argument    = "yes",
  },
  {
    index_name  = "view_filter",
    description = "Fiter output sentence to show result, is a file that return a LUA function [default=nil]",
    long        = "view-filter",
    argument    = "yes",
  },
  {
    index_name  = "max_h_out",
    description = "Max HOut for NBest graph [default=0]",
    long        = "max-h-out",
    argument    = "yes",
  },
  {
    index_name  = "save_nbest_wg",
    description = "Word Graph of NBest filename",
    long        = "save-nbest-wg",
    argument    = "yes",
  },
  {
    index_name  = "nbest",
    description = "Number of nbest",
    long        = "nbest",
    argument    = "yes",
  },
  {
    index_name  = "save_nbest",
    description = "Filename for save Nbest list",
    long        = "save-nbest",
    argument    = "yes",
  },
  {
    index_name  = "features",
    description = "Filename for save Nbest list features",
    long        = "features",
    argument    = "yes",
  },
  {
    index_name  = "uniq_nbest",
    description = "For indicate UNIQ nbest paths [default=yes]",
    long        = "uniq-nbest",
    argument    = "yes",
  },
  {
    index_name  = "lattice_tool",
    description = "For indicate the use of lattice-tool for nbest [default=no]",
    long        = "lattice-tool",
    argument    = "yes",
  },
  {
    index_name  = "cache_size",
    description = "Size of cache for NNLMs [default=20]",
    long        = "cache-size",
    argument    = "yes",
  },
  {
    index_name  = "use_ref_annotations",
    description = "Use reference annotations for hte CACHE [default=no]",
    long        = "use-ref-annotations",
    argument    = "yes",
  },
  {
    index_name  = "trie_size",
    description = "Size of TrieVector for NNLMs [default=24]",
    long        = "trie-size",
    argument    = "yes",
  },
  {
    index_name  = "feats_format",
    description = "Format of features (mat or mfc)",
    long        = "feats-format",
    argument    = "yes",
  },
  {
    index_name  = "feats_norm",
    description = "Table with means and devs for features",
    long        = "feats-norm",
    argument    = "yes",
  },
  {
    index_name  = "recog",
    description = "Recog type: asr, htr, online [default=htr]",
    long        = "recog",
    argument    = "yes"
  },
  {
    index_name  = "ose",
    description = "Oversegmenter type: dummy, htr, maxdiff, online [default=dummy in asr recog type, htr in htr recog type, online in htr-online recog type]",
    long        = "ose",
    argument    = "yes",
  },
  {
    index_name  = "cells_per_frame",
    description = "Number of cells per frame in the parametrizer (default: 20)",
    long        = "cells-per-frame",
    argument    = "yes",
  },
  {
    index_name  = "wadvance",
    description = "Window advance in ASR, in milliseconds [default=10] used to compute the real time factor",
    long        = "wadvance",
    argument    = "yes",
  },
  {
    index_name  = "output_lm_words",
    description = "Output LM Words instead of OutSyms [default=no]",
    long        = "output-lm-words",
    argument    = "yes",
  },
  {
    index_name  = "use_bcc",
    description = "Use BCC during decoding [default=yes]",
    long        = "use-bcc",
    argument    = "yes",
  },
  {
    index_name  = "use_ecc",
    description = "Use ECC during decoding [default=yes]",
    long        = "use-ecc",
    argument    = "yes",
  },
  {
    index_name  = "unk",
    description = "Generate UNK words at the recognizer output given the difference "..
                  "threshold: a positive number [default NONE]",
    long        = "unk",
    argument    = "yes",
  },
  {
    index_name  = "cache_txt",
    description = "Transcriptions for CACHE before each recognition step (default: nil)",
    long        = "cache-txt",
    argument    = "yes",
  },
  {
    index_name  = "discriminative_smoothing",
    description = "Apply discriminative smoothing (linear interpolation) with given parameter (default: nil)",
    long        = "discriminative-smoothing",
    argument    = "yes",
  },
  {
    index_name  = "right_left",
    description = "recognise going from right to left (default: no)",
    long        = "right-left",
    argument    = "yes",
  },
  {
    description = "shows this help message",
    short = "h",
    long = "help",
    argument = "no",
    action = function (argument) 
	       print(cmdOptTest:generate_help()) 
	       os.exit(1)
	     end    
  }
}
