ace-0.2: Attempto Controlled English parser and printer

Safe HaskellNone

ACE.Types.Syntax

Description

Types for the syntax tree.

Synopsis

Documentation

data Specification Source

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

data SentenceCoord Source

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.

data TopicalizedSentence Source

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 N' Source

Modified noun.

Instances

data NP Source

Noun-phrase.

Constructors

NP !Specifier !N' 

Instances

data N Source

A noun.

Constructors

N !Text 

Instances

data PP Source

Constructors

PP !Preposition !NPCoord 

Instances

data VP Source

Constructors

VP !V' 
VPNeg !Copula !V' 

Instances

data V' Source

Constructors

V' !(Maybe AdverbCoord) !ComplV ![VModifier] 

Instances

data Compl Source

Constructors

ComplNP !NPCoord 
ComplPP !PP 

Instances

data Adverb Source

Constructors

Adverb !Text 

data Aux Source

Constructors

Do

"do"

Does

"does"

Instances

data Coord Source

Constructors

And

"and"

Or

"or"

Instances

data Copula Source

Constructors

Is

"is"

Are

"are"

data Determiner Source

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"

data GeneralizedQuantor Source

Constructors

AtMost

"at most"

AtLeast

"at least"

MoreThan

"more than"

LessThan

"less than"

NotMoreThan

"not more than"

NotLessThan

"not less than"

data PossessivePronoun Source

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 Source

Constructors

It

"it"

HeShe

"he" / "she"

Himher

"him" / "her"

They

"they"

Them

"them"

Itself

"itself"

HimHerSelf

"himself" / "herself"

Themselves

"themselves"

SomeoneSomebody

"someone" / "somebody"

Something

"something"

NoOneNobody

"no one" / "nobody"

NoThing

"nothing"

EveryoneEverybody

"everyone" / "everybody"

Everything

"everything"

NotEveryoneEverybody

"not everyone" / "not everybody"

NotEverything

"not everything"

WhatWho

"what" / "who"

Whom

"whom"

WhichWho

"which" / "who"

data SaxonGenitiveMarker Source

The Saxon genitive used for possession.

Constructors

Apostrophe

"'"

ApostropheS

"'s"