GenI-0.25.0.1: A natural language generator (specifically, an FB-LTAG surface realiser)

Safe HaskellNone
LanguageHaskell2010

NLP.GenI.Configuration

Contents

Synopsis

Documentation

emptyParams :: Params Source #

The default parameters configuration

usage Source #

Arguments

:: [OptSection]

options

-> String

prog name

-> String 

Print out a GenI-style usage message with options divided into sections

basicSections :: [OptSection] Source #

optionsSections :: [OptSection] Source #

processInstructions :: Params -> IO Params Source #

Update the internal instructions list, test suite and case according to the contents of an instructions file.

Basic approach

  • we always have instructions: if no instructions file, is specified we infer virtual instructions from the test suite flag
  • the testsuite and testcase flags are focusing tools, they pick out a subset from the instructions

optionsForStandardGenI :: [OptDescr Flag] Source #

Uses the GetOpt library to process the command line arguments. Note that we divide them into basic and advanced usage.

noArg :: forall f. (Eq f, Typeable f) => (() -> f) -> ArgDescr Flag Source #

reqArg Source #

Arguments

:: (Eq f, Typeable f, Typeable x) 
=> (x -> f)

flag

-> (String -> x)

string reader for flag (probably |id| if already a String)

-> String

description

-> ArgDescr Flag 

optArg Source #

Arguments

:: (Eq f, Typeable f, Typeable x) 
=> (x -> f)

flag

-> x

default value

-> (String -> x)

string reader (as in reqArg)

-> String

description

-> ArgDescr Flag 

parseFlagWithParsec :: String -> Parser b -> Text -> b Source #

TODO: This is a horrible and abusive use of error

configration files

class Typeable k a #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#

Orphan instances