ace-0.6: Attempto Controlled English parser and printer

Safe HaskellSafe
LanguageHaskell98

ACE.Types.Syntax

Description

Types for the syntax tree.

Synopsis

Documentation

data Specification #

Specifications consist of a sentence coordination followed by a period and optionally one ore more subsequent specifications.

Instances
Eq Specification # 
Instance details

Defined in ACE.Types.Syntax

Show Specification # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Specification # 
Instance details

Defined in ACE.Html

Pretty Specification # 
Instance details

Defined in ACE.Pretty

data SentenceCoord #

Sentences can be coordinated by and and or. And refers to the logical conjunction, while or de-notes the logical disjunction. The logical conjunction has a higher precedence than the disjunction.

Both connectors are right-associative. The expression

A or B and C or D

is therefore ordered like

A ∨ ((B ∧ C) ∨ D)

To enable more combinations, we have introduced comma-and and comma-or. These expressions reverse the order of precedence. To achieve the order

A ∨ (B ∧ (C ∨ D))

we can write

A, or B, and C or D

A sentence coordination in general consists of a sentence coordination of a lower level (thus ensuring right-associativity) optionally followed by the respective connector and a sentence coordination of the same level.

Instances
Eq SentenceCoord # 
Instance details

Defined in ACE.Types.Syntax

Show SentenceCoord # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup SentenceCoord # 
Instance details

Defined in ACE.Html

Pretty SentenceCoord # 
Instance details

Defined in ACE.Pretty

data TopicalizedSentence #

A topicalized sentence can start with an existential topic or a universal topic. It needs, however, not be topicalized at all but can just be an ordinary composite sentence.

Constructors

TopicalizedSentenceExistential !ExistentialTopic !(Maybe SentenceCoord)

Example: "There is a card such that the code of the card is valid."

TopicalizedSentenceUniversal !UniversalTopic !SentenceCoord

Example: "For every code there is a card such that the code belongs to it."

TopicalizedSentenceComposite !CompositeSentence

Example: "Homer is a man."

data Sentence #

Constructors

Sentence !NPCoord !VPCoord 
Instances
Eq Sentence # 
Instance details

Defined in ACE.Types.Syntax

Show Sentence # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Sentence # 
Instance details

Defined in ACE.Html

Pretty Sentence # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Sentence -> Builder #

data NPCoord #

Instances
Eq NPCoord # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: NPCoord -> NPCoord -> Bool #

(/=) :: NPCoord -> NPCoord -> Bool #

Show NPCoord # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup NPCoord # 
Instance details

Defined in ACE.Html

Pretty NPCoord # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: NPCoord -> Builder #

data N' #

Modified noun.

Instances
Eq N' # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: N' -> N' -> Bool #

(/=) :: N' -> N' -> Bool #

Show N' # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> N' -> ShowS #

show :: N' -> String #

showList :: [N'] -> ShowS #

ToMarkup N' # 
Instance details

Defined in ACE.Html

Pretty N' # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: N' -> Builder #

data NP #

Noun-phrase.

Instances
Eq NP # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: NP -> NP -> Bool #

(/=) :: NP -> NP -> Bool #

Show NP # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> NP -> ShowS #

show :: NP -> String #

showList :: [NP] -> ShowS #

ToMarkup NP # 
Instance details

Defined in ACE.Html

Pretty NP # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: NP -> Builder #

data N #

A noun.

Constructors

N !Text 
Instances
Eq N # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: N -> N -> Bool #

(/=) :: N -> N -> Bool #

Show N # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> N -> ShowS #

show :: N -> String #

showList :: [N] -> ShowS #

ToMarkup N # 
Instance details

Defined in ACE.Html

Pretty N # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: N -> Builder #

data PP #

Constructors

PP !Preposition !NPCoord 
Instances
Eq PP # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: PP -> PP -> Bool #

(/=) :: PP -> PP -> Bool #

Show PP # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> PP -> ShowS #

show :: PP -> String #

showList :: [PP] -> ShowS #

ToMarkup PP # 
Instance details

Defined in ACE.Html

Pretty PP # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: PP -> Builder #

data Preposition #

Constructors

Preposition !Text 
Instances
Eq Preposition # 
Instance details

Defined in ACE.Types.Syntax

Show Preposition # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Preposition # 
Instance details

Defined in ACE.Html

Pretty Preposition # 
Instance details

Defined in ACE.Pretty

data ApposCoord #

Instances
Eq ApposCoord # 
Instance details

Defined in ACE.Types.Syntax

Show ApposCoord # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup ApposCoord # 
Instance details

Defined in ACE.Html

Pretty ApposCoord # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: ApposCoord -> Builder #

data Apposition #

Instances
Eq Apposition # 
Instance details

Defined in ACE.Types.Syntax

Show Apposition # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Apposition # 
Instance details

Defined in ACE.Html

Pretty Apposition # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Apposition -> Builder #

data Quotation #

Constructors

Quotation !Text 
Instances
Eq Quotation # 
Instance details

Defined in ACE.Types.Syntax

Show Quotation # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Quotation # 
Instance details

Defined in ACE.Html

Pretty Quotation # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Quotation -> Builder #

data Variable #

Constructors

Variable !Text 
Instances
Eq Variable # 
Instance details

Defined in ACE.Types.Syntax

Show Variable # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Variable # 
Instance details

Defined in ACE.Html

Pretty Variable # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Variable -> Builder #

data ProperName #

Constructors

ProperName !Text 
Instances
Eq ProperName # 
Instance details

Defined in ACE.Types.Syntax

Show ProperName # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup ProperName # 
Instance details

Defined in ACE.Html

Pretty ProperName # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: ProperName -> Builder #

data VPCoord #

Constructors

VPCoord' !VP !Coord !VPCoord 
VPCoordVP !VP 
Instances
Eq VPCoord # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: VPCoord -> VPCoord -> Bool #

(/=) :: VPCoord -> VPCoord -> Bool #

Show VPCoord # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup VPCoord # 
Instance details

Defined in ACE.Html

Pretty VPCoord # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: VPCoord -> Builder #

data GenitiveN' #

Instances
Eq GenitiveN' # 
Instance details

Defined in ACE.Types.Syntax

Show GenitiveN' # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup GenitiveN' # 
Instance details

Defined in ACE.Html

Pretty GenitiveN' # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: GenitiveN' -> Builder #

data VP #

Constructors

VP !V' 
VPNeg !Copula !V' 
Instances
Eq VP # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: VP -> VP -> Bool #

(/=) :: VP -> VP -> Bool #

Show VP # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> VP -> ShowS #

show :: VP -> String #

showList :: [VP] -> ShowS #

ToMarkup VP # 
Instance details

Defined in ACE.Html

Pretty VP # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: VP -> Builder #

data V' #

Constructors

V' !(Maybe AdverbCoord) !ComplV ![VModifier] 
Instances
Eq V' # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: V' -> V' -> Bool #

(/=) :: V' -> V' -> Bool #

Show V' # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> V' -> ShowS #

show :: V' -> String #

showList :: [V'] -> ShowS #

ToMarkup V' # 
Instance details

Defined in ACE.Html

Pretty V' # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: V' -> Builder #

data AdverbCoord #

Instances
Eq AdverbCoord # 
Instance details

Defined in ACE.Types.Syntax

Show AdverbCoord # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup AdverbCoord # 
Instance details

Defined in ACE.Html

Pretty AdverbCoord # 
Instance details

Defined in ACE.Pretty

data CopulaCompl #

Instances
Eq CopulaCompl # 
Instance details

Defined in ACE.Types.Syntax

Show CopulaCompl # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup CopulaCompl # 
Instance details

Defined in ACE.Html

Pretty CopulaCompl # 
Instance details

Defined in ACE.Pretty

data APCoord #

Instances
Eq APCoord # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: APCoord -> APCoord -> Bool #

(/=) :: APCoord -> APCoord -> Bool #

Show APCoord # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup APCoord # 
Instance details

Defined in ACE.Html

Pretty APCoord # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: APCoord -> Builder #

data APgrad #

Constructors

APgradAPThan !AP !NPCoord 
APgradAP !AP 
Instances
Eq APgrad # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: APgrad -> APgrad -> Bool #

(/=) :: APgrad -> APgrad -> Bool #

Show APgrad # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup APgrad # 
Instance details

Defined in ACE.Html

Pretty APgrad # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: APgrad -> Builder #

data AP #

Instances
Eq AP # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: AP -> AP -> Bool #

(/=) :: AP -> AP -> Bool #

Show AP # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> AP -> ShowS #

show :: AP -> String #

showList :: [AP] -> ShowS #

ToMarkup AP # 
Instance details

Defined in ACE.Html

Pretty AP # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: AP -> Builder #

data Compl #

Constructors

ComplNP !NPCoord 
ComplPP !PP 
Instances
Eq Compl # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: Compl -> Compl -> Bool #

(/=) :: Compl -> Compl -> Bool #

Show Compl # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> Compl -> ShowS #

show :: Compl -> String #

showList :: [Compl] -> ShowS #

ToMarkup Compl # 
Instance details

Defined in ACE.Html

Pretty Compl # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Compl -> Builder #

data IntransitiveV #

Constructors

IntransitiveV !Text 
Instances
Eq IntransitiveV # 
Instance details

Defined in ACE.Types.Syntax

Show IntransitiveV # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup IntransitiveV # 
Instance details

Defined in ACE.Html

Pretty IntransitiveV # 
Instance details

Defined in ACE.Pretty

data TransitiveV #

Constructors

TransitiveV !Text 
Instances
Eq TransitiveV # 
Instance details

Defined in ACE.Types.Syntax

Show TransitiveV # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup TransitiveV # 
Instance details

Defined in ACE.Html

Pretty TransitiveV # 
Instance details

Defined in ACE.Pretty

data VModifier #

Instances
Eq VModifier # 
Instance details

Defined in ACE.Types.Syntax

Show VModifier # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup VModifier # 
Instance details

Defined in ACE.Html

Pretty VModifier # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: VModifier -> Builder #

data AdverbialPP #

Instances
Eq AdverbialPP # 
Instance details

Defined in ACE.Types.Syntax

Show AdverbialPP # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup AdverbialPP # 
Instance details

Defined in ACE.Html

Pretty AdverbialPP # 
Instance details

Defined in ACE.Pretty

data Adverb #

Constructors

Adverb !Text 
Instances
Eq Adverb # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: Adverb -> Adverb -> Bool #

(/=) :: Adverb -> Adverb -> Bool #

Show Adverb # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Adverb # 
Instance details

Defined in ACE.Html

Pretty Adverb # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Adverb -> Builder #

data Specifier #

Instances
Eq Specifier # 
Instance details

Defined in ACE.Types.Syntax

Show Specifier # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Specifier # 
Instance details

Defined in ACE.Html

Pretty Specifier # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Specifier -> Builder #

data NumberP #

Instances
Eq NumberP # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: NumberP -> NumberP -> Bool #

(/=) :: NumberP -> NumberP -> Bool #

Show NumberP # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup NumberP # 
Instance details

Defined in ACE.Html

Pretty NumberP # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: NumberP -> Builder #

data Aux #

Constructors

Do

"do"

Does

"does"

Instances
Eq Aux # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: Aux -> Aux -> Bool #

(/=) :: Aux -> Aux -> Bool #

Show Aux # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> Aux -> ShowS #

show :: Aux -> String #

showList :: [Aux] -> ShowS #

ToMarkup Aux # 
Instance details

Defined in ACE.Html

Pretty Aux # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Aux -> Builder #

data Coord #

Constructors

And

"and"

Or

"or"

Instances
Eq Coord # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: Coord -> Coord -> Bool #

(/=) :: Coord -> Coord -> Bool #

Show Coord # 
Instance details

Defined in ACE.Types.Syntax

Methods

showsPrec :: Int -> Coord -> ShowS #

show :: Coord -> String #

showList :: [Coord] -> ShowS #

ToMarkup Coord # 
Instance details

Defined in ACE.Html

Pretty Coord # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Coord -> Builder #

data Copula #

Constructors

Is

"is"

Are

"are"

Instances
Eq Copula # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: Copula -> Copula -> Bool #

(/=) :: Copula -> Copula -> Bool #

Show Copula # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Copula # 
Instance details

Defined in ACE.Html

Pretty Copula # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Copula -> Builder #

data Determiner #

Constructors

The

"the"

A

"a"

An

"an"

Some

"some"

No

"no"

EveryEach

"every" / "each"

All

"all"

NotEvery

"not every"

NotEach

"not each"

NotAll

"not all"

Which

"which"

Instances
Eq Determiner # 
Instance details

Defined in ACE.Types.Syntax

Show Determiner # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Determiner # 
Instance details

Defined in ACE.Html

Pretty Determiner # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Determiner -> Builder #

data GeneralizedQuantor #

Constructors

AtMost

"at most"

AtLeast

"at least"

MoreThan

"more than"

LessThan

"less than"

NotMoreThan

"not more than"

NotLessThan

"not less than"

data PossessivePronoun #

Constructors

His

"his"

Her

"her"

HisHer

"his/her"

Its

"its"

Their

"their"

HisHerOwn

"his own" "her own" "his/her own"

ItsOwn

"its own"

TheirOwn

"their own"

Whose

"whose"

data Pronoun #

Instances
Eq Pronoun # 
Instance details

Defined in ACE.Types.Syntax

Methods

(==) :: Pronoun -> Pronoun -> Bool #

(/=) :: Pronoun -> Pronoun -> Bool #

Show Pronoun # 
Instance details

Defined in ACE.Types.Syntax

ToMarkup Pronoun # 
Instance details

Defined in ACE.Html

Pretty Pronoun # 
Instance details

Defined in ACE.Pretty

Methods

pretty :: Pronoun -> Builder #