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

Safe HaskellSafe-Infered

NLP.GenI.Lexicon.Internal

Description

Internals of lexical entry manipulation

Synopsis

Documentation

type Lexicon = [LexEntry]

Collection of lexical entries

data LexEntry

Lexical entry

Constructors

LexEntry 

Fields

iword :: FullList Text

normally just a singleton, useful for merging synonyms

ifamname :: Text

tree family to anchor to

iparams :: [GeniVal]

parameters (deprecrated; use the interface)

iinterface :: Flist GeniVal

features to unify with tree schema interface

ifilters :: Flist GeniVal

features to pick out family members we want

iequations :: Flist GeniVal

path equations

isemantics :: Sem

lexical semantics

isempols :: [SemPols]

polarities (must be same length as isemantics)

mkLexEntry

Arguments

:: FullList Text

word

-> Text

family name

-> [GeniVal]

parameters list (deprecated)

-> Flist GeniVal

interface (use instead of params)

-> Flist GeniVal

filters

-> Flist GeniVal

equations

-> Sem

semantics

-> LexEntry 

See also mkFullLexEntry This version comes with some sensible defaults.

mkFullLexEntry

Arguments

:: FullList Text

word

-> Text

family name

-> [GeniVal]

parameters list (deprecated)

-> Flist GeniVal

interface (use instead of params)

-> Flist GeniVal

filters

-> Flist GeniVal

equations

-> Sem

semantics

-> [SemPols]

semantic polarities

-> LexEntry 

Variant of mkLexEntry but with more control

type PolValue = (GeniVal, Int)

An annotated GeniVal. This is for a rather old, obscure variant on the polarity filtering optimisation. To account for zero literal semantics, we annotate each value in the semantics with a positive/negative marker. These markers are then counted up to determine with we need to insert more literals into the semantics or not. See the manual on polarity filtering for more details

fromLexSem :: [Literal PolValue] -> (Sem, [SemPols])

Separate an input lexical semantics into the actual semantics and the semantic polarity entries (which aren't used very much in practice, being a sort of experimental feature to solve an obscure-ish technical problem)

fromLexLiteral :: Literal PolValue -> (Literal GeniVal, SemPols)

Note that by convention we ignore the polarity associated with the predicate itself