From 3e5d7ce229735db70b02a4b5b071aeb84a399b31 Mon Sep 17 00:00:00 2001 From: aarne Date: Sat, 7 Jan 2006 22:30:36 +0000 Subject: [PATCH] reordered and documented Cat modules --- lib/resource-1.0/abstract/Cat.gf | 125 ++++++++++++---------- lib/resource-1.0/abstract/Phrase.gf | 8 +- lib/resource-1.0/english/CatEng.gf | 96 +++++++++++------ lib/resource-1.0/german/CatGer.gf | 77 ++++++++----- lib/resource-1.0/scandinavian/CatScand.gf | 104 +++++++++++------- 5 files changed, 249 insertions(+), 161 deletions(-) diff --git a/lib/resource-1.0/abstract/Cat.gf b/lib/resource-1.0/abstract/Cat.gf index 8cc264920..0158a5e60 100644 --- a/lib/resource-1.0/abstract/Cat.gf +++ b/lib/resource-1.0/abstract/Cat.gf @@ -2,78 +2,95 @@ abstract Cat = { cat - Text ; - Phr ; - Utt ; - Imp ; +-- Top-level units constructed in $Phrase$. - S ; - QS ; - RS ; + Text ; -- text consisting of several phrases + Phr ; -- phrase in a text e.g. "But be quiet my darling." + Utt ; -- sentence, question, "one-word utterance"... e.g. "be quiet" + Voc ; -- vocative or "please" e.g. "my darling" - Cl ; - QCl ; - RCl ; +-- Tensed sentences constructed in $Tensed$ and, with just present forms, in $Untensed$. - Slash ; + S ; -- declarative sentence e.g. "she lived here" + QS ; -- question e.g. "where did she live" + RS ; -- relative e.g. "in which she lived" - VP ; +-- Clauses constructed in $Sentence$. - V ; - V2 ; - V3 ; + Cl ; -- declarative clause, with all tense forms e.g. "she looks at this" + Slash ; -- clause lacking object (S/NP in GPSG) e.g. "she looks at" + Imp ; -- imperative e.g. "look at this" - VV ; - VS ; - VQ ; +-- Questions and interrogatives, constructed in $Question$. - VA ; - V2A ; + QCl ; -- question clause, with all tense forms e.g. "why does she walk" + IP ; -- interrogative pronoun e.g. "who" + IAdv ; -- interrogative adverb e.g. "why" + IDet ; -- interrogative determiner e.g. "which" - AP ; +-- Relatives, constructed in $Relative$. - Comp ; - SC ; + RCl ; -- relative clause, with all tense forms e.g. "in which she lives" + RP ; -- relative pronoun e.g. "in which" - A ; - A2 ; +-- Verb phrases, constructed in $Verb$. - Adv ; - AdV ; - AdA ; - AdS ; - AdN ; + VP ; -- verb phrase e.g. "is very warm" + Comp ; -- complement of copula, e.g. AP, NP e.g. "very warm" + SC ; -- sentential noun phrase: e.g. 'that' clause e.g. "that it rains" - CN ; - N ; - N2 ; - N3 ; +-- Adjectival phrases, constructed in $Adjective$. - NP ; - PN ; - Pron ; - Det ; - Predet ; - Quant ; - Num ; - Ord ; + AP ; -- adjectival phrase e.g. "very warm" - Prep ; +-- Nouns and noun phrases, constructed in $Noun$ (many also in $Structural$). - IP ; - IAdv ; - IDet ; + CN ; -- common noun (needs determiner to make NP) e.g. "red house" + NP ; -- noun phrase (usable as subject or object) e.g. "the red house" + Pron ; -- personal pronoun e.g. "she" + Det ; -- determiner phrase e.g. "all the seven" + Predet; -- predeterminer (prefixed to a quantifier) e.g. "all" + Quant ; -- quantifier (the 'kernel' of a determiner) e.g. "the" + Num ; -- cardinal number (used in a determiner) e.g. "seven" + Ord ; -- ordinal number (used in a determiner) e.g. "first" - RP ; -- relative pronoun +-- Adverbs, constructed in $Adverb$ (many also in $Structural$). - Numeral ; -- cardinal or ordinal, e.g. "five/fifth" + Adv ; -- verb-phrase-modifying adverb, e.g. "in the house" + AdV ; -- sentential adverb, typically close to verb e.g. "always" + AdA ; -- adjective-modifying adverb, e.g. "very" + AdN ; -- numeral-modifying adverb, e.g. "more than" - Conj ; -- conjunction, e.g. "and" - DConj ; -- distributed conj. e.g. "both - and" - PConj ; -- phrase-beginning conj. - CAdv ; -- comparative adverb e.g. "more", "less" - Subj ; -- subjunction, e.g. "if", "when" +-- Numeral with cardinal and ordinal forms, constructed in $Numeral$. - Voc ; -- vocative or "please" + Numeral;-- cardinal or ordinal, e.g. "five/fifth" + +-- Structural words, constructed in $Structural$. + + Conj ; -- conjunction, e.g. "and" + DConj ; -- distributed conj. e.g. "both - and" + PConj ; -- phrase-beginning conj. e.g. "therefore" + CAdv ; -- comparative adverb e.g. "more" + Subj ; -- subjunction, e.g. "if" + Prep ; -- preposition, or just a case in some langs e.g. "in" + +-- Words of open classes, constructed in $Basic$ and in additional lexicon modules. + + V ; -- one-place verb e.g. "sleep" + V2 ; -- two-place verb e.g. "love" + V3 ; -- three-place verb e.g. "show" + VV ; -- verb-phrase-complement verb e.g. "want" + VS ; -- sentence-complement verb e.g. "claim" + VQ ; -- question-complement verb e.g. "ask" + VA ; -- adjective-complement verb e.g. "look" + V2A ; -- verb with NP and AP complement e.g. "paint" + + A ; -- one-place adjective e.g. "warm" + A2 ; -- two-place adjective e.g. "divisible" + + N ; -- common noun e.g. "house" + N2 ; -- relational noun e.g. "son" + N3 ; -- three-place relational noun e.g. "connection" + PN ; -- proper name e.g. "Paris" } diff --git a/lib/resource-1.0/abstract/Phrase.gf b/lib/resource-1.0/abstract/Phrase.gf index f7598f030..4fc61e3c5 100644 --- a/lib/resource-1.0/abstract/Phrase.gf +++ b/lib/resource-1.0/abstract/Phrase.gf @@ -7,11 +7,11 @@ abstract Phrase = Cat, Tense ** { UttQS : QS -> Utt ; UttImpSg, UttImpPl : Pol -> Imp -> Utt ; - UttIP : IP -> Utt ; + UttIP : IP -> Utt ; UttIAdv : IAdv -> Utt ; - UttNP : NP -> Utt ; - UttAdv : Adv -> Utt ; - UttVP : VP -> Utt ; + UttNP : NP -> Utt ; + UttAdv : Adv -> Utt ; + UttVP : VP -> Utt ; NoPConj : PConj ; PConjConj : Conj -> PConj ; diff --git a/lib/resource-1.0/english/CatEng.gf b/lib/resource-1.0/english/CatEng.gf index 7035790dd..6e0e8434c 100644 --- a/lib/resource-1.0/english/CatEng.gf +++ b/lib/resource-1.0/english/CatEng.gf @@ -1,60 +1,86 @@ concrete CatEng of Cat = open ResEng, Prelude in { - lincat - Text, Phr, Utt = {s : Str} ; + flags optimize=all_subs ; - Imp = {s : Polarity => Number => Str} ; + lincat + +-- Phrase + + Text, Phr, Utt, Voc = {s : Str} ; + +-- Tensed/Untensed S = {s : Str} ; QS = {s : QForm => Str} ; RS = {s : Agr => Str} ; - Cl = {s : Tense => Anteriority => Polarity => Order => Str} ; - Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Str} ; +-- Sentence - QCl = {s : Tense => Anteriority => Polarity => QForm => Str} ; - RCl = {s : Tense => Anteriority => Polarity => Agr => Str} ; + Cl = {s : Tense => Anteriority => Polarity => Order => Str} ; + Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Str} ; + Imp = {s : Polarity => Number => Str} ; + +-- Question + + QCl = {s : Tense => Anteriority => Polarity => QForm => Str} ; + IP = {s : Case => Str ; n : Number} ; + IAdv = {s : Str} ; + IDet = {s : Str ; n : Number} ; + +-- Relative + + RCl = {s : Tense => Anteriority => Polarity => Agr => Str} ; + RP = {s : Case => Str ; a : RAgr} ; + +-- Verb VP = { s : Tense => Anteriority => Polarity => Order => Agr => {fin, inf : Str} ; s2 : Agr => Str } ; + Comp = {s : Agr => Str} ; + SC = {s : Str} ; + +-- Adjective + + AP = {s : Agr => Str ; isPre : Bool} ; + +-- Noun + + CN = {s : Number => Case => Str} ; + NP, Pron = {s : Case => Str ; a : Agr} ; + Det, Quant = {s : Str ; n : Number} ; + Predet, Num, Ord = {s : Str} ; + +-- Adverb + + Adv, AdV, AdA, AdS, AdN = {s : Str} ; + +-- Numeral + + Numeral = {s : CardOrd => Str ; n : Number} ; + +-- Structural + + Conj = {s : Str ; n : Number} ; + DConj = {s1,s2 : Str ; n : Number} ; + PConj = {s : Str} ; + CAdv = {s : Str} ; + Subj = {s : Str} ; + Prep = {s : Str} ; + +-- Open lexical classes, e.g. Basic V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ; V2, VV, V2A = Verb ** {c2 : Str} ; V3 = Verb ** {c2, c3 : Str} ; - AP = {s : Agr => Str ; isPre : Bool} ; - Comp = {s : Agr => Str} ; - - SC = {s : Str} ; - - A = {s : AForm => Str} ; + A = {s : AForm => Str} ; A2 = {s : AForm => Str ; c2 : Str} ; - Adv, AdV, AdA, AdS, AdN = {s : Str} ; - Prep = {s : Str} ; - - Det, Quant = {s : Str ; n : Number} ; - Predet, Num, Ord = {s : Str} ; - - CN,N = {s : Number => Case => Str} ; - PN = {s : Case => Str} ; - Pron, NP = {s : Case => Str ; a : Agr} ; + N = {s : Number => Case => Str} ; N2 = {s : Number => Case => Str} ** {c2 : Str} ; N3 = {s : Number => Case => Str} ** {c2,c3 : Str} ; - - IP = {s : Case => Str ; n : Number} ; - IDet = {s : Str ; n : Number} ; - IAdv = {s : Str} ; - - RP = {s : Case => Str ; a : RAgr} ; - - Numeral = {s : CardOrd => Str ; n : Number} ; - - CAdv = {s : Str} ; - - Conj = {s : Str ; n : Number} ; - DConj = {s1,s2 : Str ; n : Number} ; + PN = {s : Case => Str} ; } diff --git a/lib/resource-1.0/german/CatGer.gf b/lib/resource-1.0/german/CatGer.gf index bc4cc4fff..a7cd69198 100644 --- a/lib/resource-1.0/german/CatGer.gf +++ b/lib/resource-1.0/german/CatGer.gf @@ -4,61 +4,84 @@ concrete CatGer of Cat = open ResGer, Prelude in { lincat - Text, Phr, Utt = {s : Str} ; +-- Phrase - Imp = {s : Polarity => Number => Str} ; + Text, Phr, Utt, Voc = {s : Str} ; + +-- Tensed/Untensed S = {s : Order => Str} ; QS = {s : QForm => Str} ; RS = {s : GenNum => Str} ; +-- Sentence + Cl = {s : Tense => Anteriority => Polarity => Order => Str} ; Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Preposition} ; + Imp = {s : Polarity => Number => Str} ; - QCl = {s : Tense => Anteriority => Polarity => QForm => Str} ; - RCl = {s : Tense => Anteriority => Polarity => GenNum => Str} ; +-- Question + + QCl = {s : Tense => Anteriority => Polarity => QForm => Str} ; + IP = {s : Case => Str ; n : Number} ; + IAdv = {s : Str} ; + IDet = {s : Gender => Case => Str ; n : Number} ; + +-- Relative + + RCl = {s : Tense => Anteriority => Polarity => GenNum => Str} ; + RP = {s : GenNum => Case => Str ; a : RAgr} ; + +-- Verb VP = ResGer.VP ; - V, VS, VQ, VA = ResGer.Verb ; -- = {s : VForm => Str} ; - VV = Verb ** {part : Str} ; - V2, V2A = Verb ** {c2 : Preposition} ; - V3 = Verb ** {c2, c3 : Preposition} ; - - AP = {s : AForm => Str ; isPre : Bool} ; Comp = {s : Agr => Str} ; - SC = {s : Str} ; - A = {s : Degree => AForm => Str} ; - A2 = {s : Degree => AForm => Str ; c2 : Preposition} ; +-- Adjective - Adv, AdV, AdA, AdS, AdN = {s : Str} ; - Prep = {s : Str ; c : Case} ; + AP = {s : AForm => Str ; isPre : Bool} ; +-- Noun + + CN = {s : Adjf => Number => Case => Str ; g : Gender} ; + NP = {s : Case => Str ; a : Agr} ; + Pron = {s : NPForm => Str ; a : Agr} ; Det, Quant = {s : Gender => Case => Str ; n : Number ; a : Adjf} ; Predet = {s : Number => Gender => Case => Str} ; Num = {s : Gender => Case => Str} ; Ord = {s : AForm => Str} ; - CN = {s : Adjf => Number => Case => Str ; g : Gender} ; - N = {s : Number => Case => Str ; g : Gender} ; - PN = {s : Case => Str} ; - Pron = {s : NPForm => Str ; a : Agr} ; - NP = {s : Case => Str ; a : Agr} ; - N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Preposition} ; - N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Preposition} ; +-- Adverb - IP = {s : Case => Str ; n : Number} ; - IDet = {s : Gender => Case => Str ; n : Number} ; - IAdv = {s : Str} ; + Adv, AdV, AdA, AdS, AdN = {s : Str} ; - RP = {s : GenNum => Case => Str ; a : RAgr} ; +-- Numeral Numeral = {s : CardOrd => Str ; n : Number} ; - CAdv = {s : Str} ; +-- Structural Conj = {s : Str ; n : Number} ; DConj = {s1,s2 : Str ; n : Number} ; + PConj = {s : Str} ; + CAdv = {s : Str} ; + Subj = {s : Str} ; + Prep = {s : Str ; c : Case} ; + +-- Open lexical classes, e.g. Basic + + V, VS, VQ, VA = ResGer.Verb ; -- = {s : VForm => Str} ; + VV = Verb ** {part : Str} ; + V2, V2A = Verb ** {c2 : Preposition} ; + V3 = Verb ** {c2, c3 : Preposition} ; + + A = {s : Degree => AForm => Str} ; + A2 = {s : Degree => AForm => Str ; c2 : Preposition} ; + + N = {s : Number => Case => Str ; g : Gender} ; + N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Preposition} ; + N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Preposition} ; + PN = {s : Case => Str} ; } diff --git a/lib/resource-1.0/scandinavian/CatScand.gf b/lib/resource-1.0/scandinavian/CatScand.gf index 002d46037..823b9cba9 100644 --- a/lib/resource-1.0/scandinavian/CatScand.gf +++ b/lib/resource-1.0/scandinavian/CatScand.gf @@ -1,22 +1,39 @@ incomplete concrete CatScand of Cat = open ResScand, Prelude, DiffScand, (R = ParamX) in { - lincat - Text, Phr, Utt = {s : Str} ; + flags optimize=all_subs ; + lincat + +-- Phrase + + Text, Phr, Utt, Voc = {s : Str} ; + +-- Tensed/Untensed + + S = {s : Order => Str} ; + QS = {s : QForm => Str} ; + RS = {s : Agr => Str} ; + +-- Sentence + + Cl = {s : Tense => Anteriority => Polarity => Order => Str} ; + Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Str} ; Imp = {s : Polarity => Number => Str} ; - S = {s : Order => Str} ; - QS = {s : QForm => Str} ; - RS = {s : Agr => Str} ; +-- Question - Cl = {s : Tense => Anteriority => Polarity => Order => Str} ; - Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Str} ; + QCl = {s : Tense => Anteriority => Polarity => QForm => Str} ; + IP = {s : NPForm => Str ; gn : GenNum} ; + IAdv = {s : Str} ; + IDet = {s : Gender => Str ; n : Number ; det : DetSpecies} ; - QCl = {s : Tense => Anteriority => Polarity => QForm => Str} ; - RCl = {s : Tense => Anteriority => Polarity => Agr => Str} ; +-- Relative --- Constructed in $Verb$. + RCl = {s : Tense => Anteriority => Polarity => Agr => Str} ; + RP = {s : GenNum => RCase => Str ; a : RAgr} ; + +-- Verb VP = { s : VPForm => { @@ -29,49 +46,54 @@ incomplete concrete CatScand of Cat = ext : Str ; -- S-Ext att hon går ---s7 en2,ea2,eext : Bool -- indicate if the field exists } ; + Comp = {s : AFormPos => Str} ; + SC = {s : Str} ; -- always Sub + + +-- Adjective + + AP = {s : AFormPos => Str ; isPre : Bool} ; + +-- Noun + + CN = {s : Number => DetSpecies => Case => Str ; g : Gender} ; + NP,Pron = {s : NPForm => Str ; a : Agr} ; + Det, Quant = {s : Gender => Str ; n : Number ; det : DetSpecies} ; + Predet = {s : GenNum => Str} ; + Num = {s : Gender => Str} ; + Ord = {s : Str} ; + +-- Adverb + + Adv, AdV, AdA, AdS, AdN = {s : Str} ; + +-- Numeral + + Numeral = {s : CardOrd => Str ; n : Number} ; + +-- Structural + + Conj = {s : Str ; n : Number} ; + DConj = {s1,s2 : Str ; n : Number} ; + PConj = {s : Str} ; + CAdv = {s : Str} ; + Subj = {s : Str} ; + Prep = {s : Str} ; + +-- Open lexical classes, e.g. Basic V, VS, VQ, VA = Verb ; V2, VV, V2A = Verb ** {c2 : Str} ; V3 = Verb ** {c2,c3 : Str} ; - AP = {s : AFormPos => Str ; isPre : Bool} ; - Comp = {s : AFormPos => Str} ; - - SC = {s : Str} ; -- always Sub - A = Adjective ; -- {s : AForm => Str} ; A2 = Adjective ** {c2 : Str} ; - Adv, AdV, AdA, AdS, AdN = {s : Str} ; - Prep = {s : Str} ; - --- Constructed in $Noun$. - - Det, Quant = {s : Gender => Str ; n : Number ; det : DetSpecies} ; - Predet = {s : GenNum => Str} ; - Num = {s : Gender => Str} ; - Ord = {s : Str} ; - N = Noun ; -- {s : Number => Species => Case => Str ; g : Gender} ; - CN = {s : Number => DetSpecies => Case => Str ; g : Gender} ; - PN = {s : Case => Str ; g : Gender} ; - Pron, NP = {s : NPForm => Str ; a : Agr} ; N2 = Noun ** {c2 : Str} ; N3 = Noun ** {c2,c3 : Str} ; - - IP = {s : NPForm => Str ; gn : GenNum} ; - IDet = {s : Gender => Str ; n : Number ; det : DetSpecies} ; - IAdv = {s : Str} ; - - RP = {s : GenNum => RCase => Str ; a : RAgr} ; - - Numeral = {s : CardOrd => Str ; n : Number} ; - - CAdv = {s : Str} ; - - Conj = {s : Str ; n : Number} ; - DConj = {s1,s2 : Str ; n : Number} ; + PN = {s : Case => Str ; g : Gender} ; }