Safe Haskell | None |
---|
Parsers for ACE syntax types.
- data ACEParser s m = ACE {
- aceIntransitiveAdjective :: ParsecT s (ACEParser s m) m Text
- aceTransitiveAdjective :: ParsecT s (ACEParser s m) m Text
- aceNoun :: ParsecT s (ACEParser s m) m Text
- acePreposition :: ParsecT s (ACEParser s m) m Text
- aceVariable :: ParsecT s (ACEParser s m) m Text
- aceProperName :: ParsecT s (ACEParser s m) m Text
- aceAdverb :: ParsecT s (ACEParser s m) m Text
- aceIntransitiveVerb :: ParsecT s (ACEParser s m) m Text
- acePhrasalTransitiveV :: ParsecT s (ACEParser s m) m Text
- acePhrasalDistransitiveV :: ParsecT s (ACEParser s m) m Text
- aceTransitiveVerb :: ParsecT s (ACEParser s m) m Text
- aceDistransitiveVerb :: ParsecT s (ACEParser s m) m Text
- acePhrasalParticle :: ParsecT s (ACEParser s m) m Text
- acePhrasalIntransitiveV :: ParsecT s (ACEParser s m) m Text
- defaultACEParser :: Stream s m Token => ACEParser s m
- specification :: Stream s m Token => ParsecT s (ACEParser s m) m Specification
- sentenceCoord :: Stream s m Token => ParsecT s (ACEParser s m) m SentenceCoord
- sentenceCoord_1 :: Stream s m Token => ParsecT s (ACEParser s m) m SentenceCoord_1
- sentenceCoord_2 :: Stream s m Token => ParsecT s (ACEParser s m) m SentenceCoord_2
- sentenceCoord_3 :: Stream s m Token => ParsecT s (ACEParser s m) m SentenceCoord_3
- topicalizedSentence :: Stream s m Token => ParsecT s (ACEParser s m) m TopicalizedSentence
- universalTopic :: Stream s m Token => ParsecT s (ACEParser s m) m UniversalTopic
- compositeSentence :: Stream s m Token => ParsecT s (ACEParser s m) m CompositeSentence
- negatedSentence :: Stream s m Token => ParsecT s (ACEParser s m) m NegatedSentence
- conditionalSentence :: Stream s m Token => ParsecT s (ACEParser s m) m ConditionalSentence
- sentence :: Stream s m Token => ParsecT s (ACEParser s m) m Sentence
- existentialTopic :: Stream s m Token => ParsecT s (ACEParser s m) m ExistentialTopic
- specifier :: Stream s m Token => ParsecT s (ACEParser s m) m Specifier
- preposition :: Monad m => ParsecT s (ACEParser s m) m Preposition
- genitiveTail :: Stream s m Token => ParsecT s (ACEParser s m) m GenitiveTail
- genitiveCoordTail :: Stream s m Token => ParsecT s (ACEParser s m) m GenitiveCoordTail
- saxonGenitiveTail :: Stream s m Token => ParsecT s (ACEParser s m) m SaxonGenitiveTail
- apposition :: Stream s m Token => ParsecT s (ACEParser s m) m Apposition
- apposCoord :: Stream s m Token => ParsecT s (ACEParser s m) m ApposCoord
- pp :: Stream s m Token => ParsecT s (ACEParser s m) m PP
- relativeClauseCoord :: Stream s m Token => ParsecT s (ACEParser s m) m RelativeClauseCoord
- n' :: Stream s m Token => Bool -> ParsecT s (ACEParser s m) m N'
- unmarkedNPCoord :: Stream s m Token => Bool -> ParsecT s (ACEParser s m) m UnmarkedNPCoord
- np :: Stream s m Token => Bool -> ParsecT s (ACEParser s m) m NP
- npCoord :: Stream s m Token => ParsecT s (ACEParser s m) m NPCoord
- npCoord' :: Stream s m Token => ParsecT s (ACEParser s m) m NPCoord
- relativeClause :: Stream s m Token => ParsecT s (ACEParser s m) m RelativeClause
- ofPP :: Stream s m Token => ParsecT s (ACEParser s m) m NPCoord
- npCoordX :: Stream s m Token => Bool -> ParsecT s (ACEParser s m) m NPCoord
- variable :: Monad m => ParsecT s (ACEParser s m) m Variable
- properName :: Monad m => ParsecT s (ACEParser s m) m ProperName
- quotation :: Stream s m Token => ParsecT s u m Quotation
- n :: Monad m => ParsecT s (ACEParser s m) m N
- vpCoord :: Stream s m Token => ParsecT s (ACEParser s m) m VPCoord
- vp :: Stream s m Token => ParsecT s (ACEParser s m) m VP
- genitiveN' :: Stream s m Token => ParsecT s (ACEParser s m) m GenitiveN'
- vModifier :: Stream s m Token => ParsecT s (ACEParser s m) m VModifier
- adverbialPP :: Stream s m Token => ParsecT s (ACEParser s m) m AdverbialPP
- v' :: Stream s m Token => ParsecT s (ACEParser s m) m V'
- genitiveSpecifier :: Stream s m Token => ParsecT s u m GenitiveSpecifier
- possessiveNPCoord :: Stream s m Token => ParsecT s (ACEParser s m) m PossessiveNPCoord
- saxonGenitiveMarker :: Stream s m Token => ParsecT s u m SaxonGenitiveMarker
- possessivePronounCoord :: Stream s m Token => ParsecT s u m PossessivePronounCoord
- genitiveNPCoord :: Stream s m Token => ParsecT s (ACEParser s m) m GenitiveNPCoord
- complV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplV
- complVCopula :: Stream s m Token => ParsecT s (ACEParser s m) m ComplV
- complVPDV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplV
- complVDisV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplV
- complVPV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplV
- complVPV' :: Stream s m Token => ParsecT s (ACEParser s m) m ComplV
- complVTV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplV
- phrasalDistransitiveV :: Monad m => ParsecT s (ACEParser s m) m PhrasalDistransitiveV
- phrasalTransitiveV :: Monad m => ParsecT s (ACEParser s m) m PhrasalTransitiveV
- compl :: Stream s m Token => ParsecT s (ACEParser s m) m Compl
- complVIV :: Monad m => ParsecT s (ACEParser s m) m ComplV
- complVPI :: Monad m => ParsecT s (ACEParser s m) m ComplV
- phrasalIntransitiveV :: Monad m => ParsecT s (ACEParser s m) m PhrasalIntransitiveV
- phrasalParticle :: Monad m => ParsecT s (ACEParser s m) m PhrasalParticle
- copulaCompl :: Stream s m Token => ParsecT s (ACEParser s m) m CopulaCompl
- apCoord :: Stream s m Token => ParsecT s (ACEParser s m) m APCoord
- apGrad :: Stream s m Token => ParsecT s (ACEParser s m) m APgrad
- ap :: Stream s m Token => ParsecT s (ACEParser s m) m AP
- intransitiveV :: Monad m => ParsecT s (ACEParser s m) m IntransitiveV
- transitiveV :: Monad m => ParsecT s (ACEParser s m) m TransitiveV
- distransitiveV :: Monad m => ParsecT s (ACEParser s m) m DistransitiveV
- adverbCoord :: Stream s m Token => ParsecT s (ACEParser s m) m AdverbCoord
- adverb :: Monad m => ParsecT s (ACEParser s m) m Adverb
- adjectiveCoord :: Stream s m Token => ParsecT s (ACEParser s m) m AdjectiveCoord
- intransitiveAdjective :: Monad m => ParsecT s (ACEParser s m) m IntransitiveAdjective
- transitiveAdjective :: Monad m => ParsecT s (ACEParser s m) m TransitiveAdjective
- determiner :: Stream s m Token => ParsecT s u m Determiner
- numberP :: Stream s m Token => ParsecT s u m NumberP
- existentialGlobalQuantor :: Stream s m Token => ParsecT s u m ExistentialGlobalQuantor
- existentialGlobalQuestionQuantor :: Stream s m Token => ParsecT s u m ExistentialGlobalQuestionQuantor
- aux :: Stream s m Token => ParsecT s u m Aux
- coord :: Stream s m Token => ParsecT s u m Coord
- copula :: Stream s m Token => ParsecT s u m Copula
- distributiveGlobalQuantor :: Stream s m Token => ParsecT s u m DistributiveGlobalQuantor
- distributiveMarker :: Stream s m Token => ParsecT s u m DistributiveMarker
- generalizedQuantor :: Stream s m Token => ParsecT s u m GeneralizedQuantor
- possessivePronoun :: Stream s m Token => ParsecT s u m PossessivePronoun
- universalGlobalQuantor :: Stream s m Token => ParsecT s u m UniversalGlobalQuantor
Documentation
Parser configuration.
ACE | |
|
defaultACEParser :: Stream s m Token => ACEParser s mSource
A default ACE parser configuration. Just fills in all the parsers as blanks: <noun>
, <prep>
, etc.
specification :: Stream s m Token => ParsecT s (ACEParser s m) m SpecificationSource
Some specification. A sentenceCoord
followed by a period
, and
optionally another specification
.
sentenceCoord :: Stream s m Token => ParsecT s (ACEParser s m) m SentenceCoordSource
Coordinated sentence, by: or
sentenceCoord_1 :: Stream s m Token => ParsecT s (ACEParser s m) m SentenceCoord_1Source
Coordinated sentence, by: and
sentenceCoord_2 :: Stream s m Token => ParsecT s (ACEParser s m) m SentenceCoord_2Source
Coordinated sentence, by: or
sentenceCoord_3 :: Stream s m Token => ParsecT s (ACEParser s m) m SentenceCoord_3Source
Coordinated sentence, by: and
topicalizedSentence :: Stream s m Token => ParsecT s (ACEParser s m) m TopicalizedSentenceSource
A topicalized sentence.
universalTopic :: Stream s m Token => ParsecT s (ACEParser s m) m UniversalTopicSource
A universally quantified topic.
compositeSentence :: Stream s m Token => ParsecT s (ACEParser s m) m CompositeSentenceSource
A composite sentence: conditionalSentence
, negatedSentence
or sentence
.
negatedSentence :: Stream s m Token => ParsecT s (ACEParser s m) m NegatedSentenceSource
A negated sentence: it is not the case that sentenceCoord
conditionalSentence :: Stream s m Token => ParsecT s (ACEParser s m) m ConditionalSentenceSource
A condition if sentenceCoord
then sentenceCoord
.
existentialTopic :: Stream s m Token => ParsecT s (ACEParser s m) m ExistentialTopicSource
Existential topic, a existentialGlobalQuantor
and a npCoord
: there is a chair
specifier :: Stream s m Token => ParsecT s (ACEParser s m) m SpecifierSource
A noun specifier: "a", "some", "1", "proper-name's".
preposition :: Monad m => ParsecT s (ACEParser s m) m PrepositionSource
A preposition. Configured by acePreposition
.
genitiveTail :: Stream s m Token => ParsecT s (ACEParser s m) m GenitiveTailSource
A genitive tail: dave's and a dog's
genitiveCoordTail :: Stream s m Token => ParsecT s (ACEParser s m) m GenitiveCoordTailSource
A genitive coordination tail: dave's and a dog's
saxonGenitiveTail :: Stream s m Token => ParsecT s (ACEParser s m) m SaxonGenitiveTailSource
Genitive tail.
apposition :: Stream s m Token => ParsecT s (ACEParser s m) m AppositionSource
apposCoord :: Stream s m Token => ParsecT s (ACEParser s m) m ApposCoordSource
A apposition coordination: X and Y.
pp :: Stream s m Token => ParsecT s (ACEParser s m) m PPSource
A prepositional noun phrase coordination.
relativeClauseCoord :: Stream s m Token => ParsecT s (ACEParser s m) m RelativeClauseCoordSource
A relativeClause
coordination: person that walks and cake a
person made.
n' :: Stream s m Token => Bool -> ParsecT s (ACEParser s m) m N'Source
A noun surrounded by optional adjectiveCoord
, a noun word n
,
an optional apposCoord
, an optional ofPP
, an optional
relativeClauseCoord
.
unmarkedNPCoord :: Stream s m Token => Bool -> ParsecT s (ACEParser s m) m UnmarkedNPCoordSource
Unmarked noun phrase coordination: some thing and a thing.
np :: Stream s m Token => Bool -> ParsecT s (ACEParser s m) m NPSource
A noun phrase: a thing, some stuff, the thing.
npCoord :: Stream s m Token => ParsecT s (ACEParser s m) m NPCoordSource
A coordinated noun phrase. See npCoordX
.
npCoord' :: Stream s m Token => ParsecT s (ACEParser s m) m NPCoordSource
A coordinated noun phrase. Inside a relative clause. See npCoordX
.
relativeClause :: Stream s m Token => ParsecT s (ACEParser s m) m RelativeClauseSource
Relative clause: person that walks, cake a person made, cake that a person made, etc.
ofPP :: Stream s m Token => ParsecT s (ACEParser s m) m NPCoordSource
An of prepositional phrase: of the bank
npCoordX :: Stream s m Token => Bool -> ParsecT s (ACEParser s m) m NPCoordSource
A coordinated noun phrase: each of some customers, some customers
variable :: Monad m => ParsecT s (ACEParser s m) m VariableSource
A variable. Customized by aceVariable
.
properName :: Monad m => ParsecT s (ACEParser s m) m ProperNameSource
A proper name. Customized by aceProperName
.
genitiveN' :: Stream s m Token => ParsecT s (ACEParser s m) m GenitiveN'Source
A genitive noun: dog, red cat, person 1, movie "We Need to Talk About Kevin".
vModifier :: Stream s m Token => ParsecT s (ACEParser s m) m VModifierSource
A verb modifier: quickly and loudly, to a house, from now and forever
adverbialPP :: Stream s m Token => ParsecT s (ACEParser s m) m AdverbialPPSource
Adverbial prepositional phrase: until here, by then, until now and then
v' :: Stream s m Token => ParsecT s (ACEParser s m) m V'Source
A verb. Consists of an optional adverbCoord
, a complemented
verb (complV
), and one or more verb modifiers.
TODO: I'm not actually sure whether it should be zero-to-1 or zero-to-many. The paper isn't clear what VModifier* means.
genitiveSpecifier :: Stream s m Token => ParsecT s u m GenitiveSpecifierSource
Genitive specifier: a, 1, some, his
possessiveNPCoord :: Stream s m Token => ParsecT s (ACEParser s m) m PossessiveNPCoordSource
Either a genitiveNPCoord
, or a possessivePronounCoord
.
saxonGenitiveMarker :: Stream s m Token => ParsecT s u m SaxonGenitiveMarkerSource
A ' or 's saxon genitive.
possessivePronounCoord :: Stream s m Token => ParsecT s u m PossessivePronounCoordSource
Possessive pronoun coordination: his and her
genitiveNPCoord :: Stream s m Token => ParsecT s (ACEParser s m) m GenitiveNPCoordSource
A genitive noun phrase coordination: dave's, a dog's, a man and a dog's
complV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplVSource
A complemented verb. One of complVCopula
, complVPDV
,
complVDisV
, complVPV
, complVPV'
, complVTV
.
complVCopula :: Stream s m Token => ParsecT s (ACEParser s m) m ComplVSource
A complemented copula: is valid
complVPDV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplVSource
A distransitive phrasal verb: puts an error down to a customer
complVDisV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplVSource
A distransitive complemented verb: gives a card to a customer
complVPV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplVSource
A complemented phrasal transitive verb: gives away a code
complVPV' :: Stream s m Token => ParsecT s (ACEParser s m) m ComplVSource
A complemented phrasal transitive verb, flipped: gives a code away
complVTV :: Stream s m Token => ParsecT s (ACEParser s m) m ComplVSource
Complemented transitive verb: inserts a card
phrasalDistransitiveV :: Monad m => ParsecT s (ACEParser s m) m PhrasalDistransitiveVSource
A phrasal distransitive verb: puts an error down to a customer
phrasalTransitiveV :: Monad m => ParsecT s (ACEParser s m) m PhrasalTransitiveVSource
A phrasal transitive verb: give away a thing
compl :: Stream s m Token => ParsecT s (ACEParser s m) m ComplSource
Complemented non-copula verb, e.g. Mary sees him.
complVIV :: Monad m => ParsecT s (ACEParser s m) m ComplVSource
An intransitive verb. Takes no complement. E.g. walks.
complVPI :: Monad m => ParsecT s (ACEParser s m) m ComplVSource
A phrasal intransitive verb with a complement, in this case a particle: gets in, sits up.
phrasalIntransitiveV :: Monad m => ParsecT s (ACEParser s m) m PhrasalIntransitiveVSource
A phrasal intransitive verb: gives, sits (e.g. gives up, sits
down). This is customized by acePhrasalIntransitiveV
.
phrasalParticle :: Monad m => ParsecT s (ACEParser s m) m PhrasalParticleSource
A phrasal verb particle, e.g. in, up, out (get in, get up, get
out). This is customized via acePhrasalParticle
.
copulaCompl :: Stream s m Token => ParsecT s (ACEParser s m) m CopulaComplSource
Either a graded adjective coordination ("better than a duck and faster than a mouse"), or a noun phrase coordination ("a goose and an ocelot"), or a prepositional phrase ("to a bucket or a kettle").
apCoord :: Stream s m Token => ParsecT s (ACEParser s m) m APCoordSource
A coordination of a graded adjective: "better than a potato and nicer than some bacon"
apGrad :: Stream s m Token => ParsecT s (ACEParser s m) m APgradSource
A graded adjective. Either comparative adjective phrase ("better
than a potato"), or a simple adjective phrase (see ap
).
ap :: Stream s m Token => ParsecT s (ACEParser s m) m APSource
An adjective phrase. Transitive (fond of Mary, interested in an account) or intransitive (correct, green, valid).
intransitiveV :: Monad m => ParsecT s (ACEParser s m) m IntransitiveVSource
Some intransitive verb: walks
transitiveV :: Monad m => ParsecT s (ACEParser s m) m TransitiveVSource
Some transitive verb: inserts
distransitiveV :: Monad m => ParsecT s (ACEParser s m) m DistransitiveVSource
Some distransitive verb: inserts
adverbCoord :: Stream s m Token => ParsecT s (ACEParser s m) m AdverbCoordSource
Adverb coordination: quickly and hastily and manually
adjectiveCoord :: Stream s m Token => ParsecT s (ACEParser s m) m AdjectiveCoordSource
Adjective coordination: correct and green
intransitiveAdjective :: Monad m => ParsecT s (ACEParser s m) m IntransitiveAdjectiveSource
Intransitive adjective: correct, green, valid
The actual parser for this is provided as
aceIntransitiveAdjective
in the parser configuration. You can
configure this.
transitiveAdjective :: Monad m => ParsecT s (ACEParser s m) m TransitiveAdjectiveSource
Transitive adjective: correct, green, valid
determiner :: Stream s m Token => ParsecT s u m DeterminerSource
A determiner: the, an, not every, etc.
existentialGlobalQuantor :: Stream s m Token => ParsecT s u m ExistentialGlobalQuantorSource
There is/are.
existentialGlobalQuestionQuantor :: Stream s m Token => ParsecT s u m ExistentialGlobalQuestionQuantorSource
Is/are there?
distributiveGlobalQuantor :: Stream s m Token => ParsecT s u m DistributiveGlobalQuantorSource
A distributive global quantor: for each of
distributiveMarker :: Stream s m Token => ParsecT s u m DistributiveMarkerSource
A distributive marker: each of
generalizedQuantor :: Stream s m Token => ParsecT s u m GeneralizedQuantorSource
A generalized quantor: at most, at least, etc.
possessivePronoun :: Stream s m Token => ParsecT s u m PossessivePronounSource
A possessive pronoun: his, her, his/her.
universalGlobalQuantor :: Stream s m Token => ParsecT s u m UniversalGlobalQuantorSource
A universal global quantor: for every/for each, for all.