Module GenerationEngine.GenerationRunner

Module to run the generation engine as an API.

Info:

Functions

outPrintConsole send the output to the console.
outSendNull discard the output.
outLimitNumber output limited function.
outTable output in a table.
new create a new GenerationRunner object from def.
newConfFile create a new GenerationRunner object from a config file.
getConfig return a copy of the current configuration.
setConfig change the current configuration.
runGFile run the generation engine based on a grammar file.
runGrammar execute the GenerationRunner object.

Tables

DefOptionsTab Default table for runtime configuration.


Functions

outPrintConsole
send the output to the console.

Parameters:

  • sent
  • index
outSendNull
discard the output.

Parameters:

  • info
  • index
outLimitNumber
output limited function.

Parameters:

  • lNumber
  • fOut
outTable
output in a table.
new
create a new GenerationRunner object from def. values

Parameters:

  • initConfig
newConfFile
create a new GenerationRunner object from a config file. It create a new GenerationRunner object based on a config file.

Parameters:

  • f Path to the .conf file.

Returns:

    a new GenerationRunner
getConfig
return a copy of the current configuration.

Parameters:

  • gr
setConfig
change the current configuration.

Parameters:

  • gr The GenRunner object
  • newConfig A table with the new config. See DefOptionsTab to all options.
runGFile
run the generation engine based on a grammar file.

Parameters:

  • gr
  • gFile print("GenRunner.runGFile")
runGrammar
execute the GenerationRunner object.

Parameters:

  • gr GenerationRunner object.

Tables

DefOptionsTab
Default table for runtime configuration. Can be used on the configuration files.

Fields:

  • quietExec Quiet execution
  • maxCyclesOp Max. cycles inside an operator. Like, oneOrMore operator.
  • maxCycles Global max. nonterminal cycles
  • maxDerivLen Max. derivation tree height
  • maxDerivLenFinal Max. derivarion tree height final. Only for stats
  • coverageCrit Coverage criterion to use
  • filePrefix Prefix for the output files
  • FuncResult Default function to handle the result sentences
  • FuncMeta Default function to handle the meta-information about the sentences
  • transGrammarCache Use a cache file save the transformation grammar
  • grammarTrans Use the grammar transformation chain
  • useRandomAlts Use the pseudo-random algorithm to sort the alts instructions
  • altStartSymbol Use an alternative start symbol to the generation process
generated by LDoc 1.4.5 Last updated 2017-02-24 13:19:22