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

Safe HaskellSafe-Infered

NLP.GenI.Configuration

Contents

Synopsis

Documentation

emptyParams :: Params

The default parameters configuration

usage

Arguments

:: [OptSection]

options

-> String

prog name

-> String 

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

basicSections :: [OptSection]

optionsSections :: [OptSection]

processInstructions :: Params -> IO Params

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]

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

reqArg

Arguments

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

flag

-> (String -> x)

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

-> String

description

-> ArgDescr Flag 

optArg

Arguments

:: forall f x . (Eq f, Typeable f, Eq x, 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

TODO: This is a horrible and abusive use of error

configration files

class Typeable a

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

Instances

Typeable Bool 
Typeable Char 
Typeable Double 
Typeable Float 
Typeable Int 
Typeable Int8 
Typeable Int16 
Typeable Int32 
Typeable Int64 
Typeable Integer 
Typeable Ordering 
Typeable RealWorld 
Typeable Word 
Typeable Word8 
Typeable Word16 
Typeable Word32 
Typeable Word64 
Typeable () 
Typeable IOException 
Typeable TypeRep 
Typeable Version 
Typeable YamlAnchor 
Typeable YamlNode 
Typeable YamlElem 
Typeable Handle 
Typeable Handle__ 
Typeable E0 
Typeable E1 
Typeable E2 
Typeable E3 
Typeable E6 
Typeable E9 
Typeable E12 
Typeable DataType 
Typeable CDev 
Typeable CIno 
Typeable CMode 
Typeable COff 
Typeable CPid 
Typeable CSsize 
Typeable CGid 
Typeable CNlink 
Typeable CUid 
Typeable CCc 
Typeable CSpeed 
Typeable CTcflag 
Typeable CRLim 
Typeable Fd 
Typeable PatternMatchFail 
Typeable RecSelError 
Typeable RecConError 
Typeable RecUpdError 
Typeable NoMethodError 
Typeable NonTermination 
Typeable NestedAtomically 
Typeable ThreadId 
Typeable BlockedIndefinitelyOnMVar 
Typeable BlockedIndefinitelyOnSTM 
Typeable Deadlock 
Typeable AssertionFailed 
Typeable AsyncException 
Typeable ArrayException 
Typeable ExitCode 
Typeable CChar 
Typeable CSChar 
Typeable CUChar 
Typeable CShort 
Typeable CUShort 
Typeable CInt 
Typeable CUInt 
Typeable CLong 
Typeable CULong 
Typeable CLLong 
Typeable CULLong 
Typeable CFloat 
Typeable CDouble 
Typeable CPtrdiff 
Typeable CSize 
Typeable CWchar 
Typeable CSigAtomic 
Typeable CClock 
Typeable CTime 
Typeable CUSeconds 
Typeable CSUSeconds 
Typeable CIntPtr 
Typeable CUIntPtr 
Typeable CIntMax 
Typeable CUIntMax 
Typeable SomeException 
Typeable ErrorCall 
Typeable ArithException 
Typeable TyCon 
Typeable ByteString 
Typeable ByteString 
Typeable IntSet 
Typeable SourcePos 
Typeable JSValue 
Typeable JSString 
Typeable Text 
Typeable UnicodeException 
Typeable LocalTime 
Typeable ZonedTime 
Typeable TimeOfDay 
Typeable TimeZone 
Typeable UTCTime 
Typeable NominalDiffTime 
Typeable Day 
Typeable UniversalTime 
Typeable DiffTime 
Typeable PolarityAttr 
Typeable PolarityKey 
Typeable GeniVal 
Typeable WeirdFlg 
Typeable GrammarTypeFlg 
Typeable BuilderFlg 
Typeable ViewCmdFlg 
Typeable VersionFlg 
Typeable VerboseModeFlg 
Typeable TimeoutFlg 
Typeable TestSuiteFlg 
Typeable TestInstructionsFlg 
Typeable TestCaseFlg 
Typeable StatsFileFlg 
Typeable NoLoadTestSuiteFlg 
Typeable RootFeatureFlg 
Typeable RankingConstraintsFlg 
Typeable PartialFlg 
Typeable OutputFileFlg 
Typeable OptimisationsFlg 
Typeable MorphInfoFlg 
Typeable MorphCmdFlg 
Typeable MetricsFlg 
Typeable MaxResultsFlg 
Typeable MaxStepsFlg 
Typeable TracesFlg 
Typeable MacrosFlg 
Typeable LexiconFlg 
Typeable InstructionsFileFlg 
Typeable HelpFlg 
Typeable FromStdinFlg 
Typeable EarlyDeathFlg 
Typeable DumpDerivationFlg 
Typeable DetectPolaritiesFlg 
Typeable DisableGuiFlg 
Typeable BatchDirFlg 
Typeable Flag 
Typeable GrammarType 
Typeable BuilderType 
Typeable Optimisation 
Typeable LexEntry 
Typeable GType 
Typeable Ptype 
Typeable TagElem 
Typeable TagSite 
Typeable UninflectedDisjunction 
Typeable MNAME 
Typeable MNAME 
Typeable BadInputException 
Typeable SimpleGuiItem 
Typeable Timeout 
Typeable MNAME 
(Typeable1 s, Typeable a) => Typeable (s a)

One Typeable instance for all Typeable1 instances