From dd70f6dce3e5643f8aec87eb19ac12f21d85cb63 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 29 Nov 2005 15:21:45 +0000 Subject: [PATCH] adverbs --- lib/resource-1.0/gf/Adjective.gf | 2 ++ lib/resource-1.0/gf/AdjectiveEng.gf | 17 ++++++++---- lib/resource-1.0/gf/Adverb.gf | 15 ++++++++++ lib/resource-1.0/gf/AdverbEng.gf | 18 ++++++++++++ lib/resource-1.0/gf/Cat.gf | 25 +++++++++++++++-- lib/resource-1.0/gf/CatEng.gf | 16 ++++++++++- lib/resource-1.0/gf/Conjunction.gf | 15 ++++++++++ lib/resource-1.0/gf/ConjunctionEng.gf | 26 +++++++++++++++++ lib/resource-1.0/gf/Lex.gf | 13 +++++++++ lib/resource-1.0/gf/LexEng.gf | 14 ++++++++++ lib/resource-1.0/gf/NounEng.gf | 4 ++- lib/resource-1.0/gf/ParamX.gf | 13 +++++++++ lib/resource-1.0/gf/Phrase.gf | 21 ++++++++++++++ lib/resource-1.0/gf/PhraseEng.gf | 22 +++++++++++++++ lib/resource-1.0/gf/ResEng.gf | 40 +++++++++++++++++++++++---- lib/resource-1.0/gf/Sentence.gf | 6 ++-- lib/resource-1.0/gf/SentenceEng.gf | 15 +++++++++- lib/resource-1.0/gf/Sequence.gf | 13 +++++++++ lib/resource-1.0/gf/SequenceEng.gf | 15 ++++++++++ lib/resource-1.0/gf/Test.gf | 3 ++ lib/resource-1.0/gf/TestEng.gf | 9 +++++- lib/resource-1.0/gf/Verb.gf | 8 +++++- lib/resource-1.0/gf/VerbEng.gf | 10 +++++-- lib/resource-1.0/gf/problems.txt | 6 ++++ 24 files changed, 323 insertions(+), 23 deletions(-) create mode 100644 lib/resource-1.0/gf/Adverb.gf create mode 100644 lib/resource-1.0/gf/AdverbEng.gf create mode 100644 lib/resource-1.0/gf/Conjunction.gf create mode 100644 lib/resource-1.0/gf/ConjunctionEng.gf create mode 100644 lib/resource-1.0/gf/Phrase.gf create mode 100644 lib/resource-1.0/gf/PhraseEng.gf create mode 100644 lib/resource-1.0/gf/Sequence.gf create mode 100644 lib/resource-1.0/gf/SequenceEng.gf create mode 100644 lib/resource-1.0/gf/problems.txt diff --git a/lib/resource-1.0/gf/Adjective.gf b/lib/resource-1.0/gf/Adjective.gf index c4b721049..7cae616db 100644 --- a/lib/resource-1.0/gf/Adjective.gf +++ b/lib/resource-1.0/gf/Adjective.gf @@ -9,6 +9,8 @@ abstract Adjective = Cat ** { ComplA2 : A2 -> NP -> AP ; + ReflA2 : A2 -> AP ; + SentAP : AP -> S -> AP ; QuestAP : AP -> QS -> AP ; diff --git a/lib/resource-1.0/gf/AdjectiveEng.gf b/lib/resource-1.0/gf/AdjectiveEng.gf index 01312dadf..ba8d4bd75 100644 --- a/lib/resource-1.0/gf/AdjectiveEng.gf +++ b/lib/resource-1.0/gf/AdjectiveEng.gf @@ -3,32 +3,37 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in { lin PositA a = { - s = a.s ! AAdj Posit ; + s = \\_ => a.s ! AAdj Posit ; isPre = True } ; ComparA a np = { - s = a.s ! AAdj Compar ++ "than" ++ np.s ! Nom ; + s = \\_ => a.s ! AAdj Compar ++ "than" ++ np.s ! Nom ; isPre = False } ; -- $SuperlA$ belongs to determiner syntax in $Noun$. ComplA2 a np = { - s = a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ; + s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ; + isPre = False + } ; + + ReflA2 a = { + s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ; isPre = False } ; SentAP ap s = { - s = ap.s ++ conjThat ++ s.s ; + s = \\a => ap.s ! a ++ conjThat ++ s.s ; isPre = False } ; QuestAP ap qs = { - s = ap.s ++ qs.s ! QIndir ; + s = \\a => ap.s ! a ++ qs.s ! QIndir ; isPre = False } ; AdAP ada ap = { - s = ada.s ++ ap.s ; + s = \\a => ada.s ++ ap.s ! a ; isPre = ap.isPre } ; diff --git a/lib/resource-1.0/gf/Adverb.gf b/lib/resource-1.0/gf/Adverb.gf new file mode 100644 index 000000000..54e847833 --- /dev/null +++ b/lib/resource-1.0/gf/Adverb.gf @@ -0,0 +1,15 @@ +abstract Adverb = Cat ** { + + fun + + PositAdvAdj : A -> Adv ; + ComparAdvAdj : CAdv -> A -> NP -> Adv ; + ComparAdvAdjS : CAdv -> A -> S -> Adv ; + + PrepNP : Prep -> NP -> Adv ; + + AdAdv : AdA -> Adv -> Adv ; + + SubjS : Subj -> S -> Adv ; + +} diff --git a/lib/resource-1.0/gf/AdverbEng.gf b/lib/resource-1.0/gf/AdverbEng.gf new file mode 100644 index 000000000..ab39c3a79 --- /dev/null +++ b/lib/resource-1.0/gf/AdverbEng.gf @@ -0,0 +1,18 @@ +concrete AdverbEng of Adverb = CatEng ** open ResEng, Prelude in { + + lin + PositAdvAdj a = {s = a.s ! AAdv} ; + ComparAdvAdj cadv a np = { + s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom + } ; + ComparAdvAdjS cadv a s = { + s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s + } ; + + PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; + + AdAdv = cc2 ; + + SubjS = cc2 ; + +} diff --git a/lib/resource-1.0/gf/Cat.gf b/lib/resource-1.0/gf/Cat.gf index 83400c013..71d9ff35c 100644 --- a/lib/resource-1.0/gf/Cat.gf +++ b/lib/resource-1.0/gf/Cat.gf @@ -1,5 +1,12 @@ abstract Cat = { + cat + + Text ; + Phr ; + Utt ; + Imp ; + S ; QS ; RS ; @@ -50,8 +57,22 @@ abstract Cat = { IAdv ; IDet ; - RP ; + RP ; -- relative pronoun - Numeral ; + Numeral ; -- cardinal or ordinal, e.g. "five/fifth" + + 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" + + SeqS ; -- sequence of sentences + SeqVP ; -- sequence of verb phrases + SeqAP ; -- sequence of adjectival phrases + SeqNP ; -- sequence of noun phrases + SeqAdv ; -- sequence of adverbs + + Voc ; -- vocative or "please" } diff --git a/lib/resource-1.0/gf/CatEng.gf b/lib/resource-1.0/gf/CatEng.gf index 367f0018b..442fb29d9 100644 --- a/lib/resource-1.0/gf/CatEng.gf +++ b/lib/resource-1.0/gf/CatEng.gf @@ -1,6 +1,10 @@ concrete CatEng of Cat = open ResEng, Prelude in { lincat + Text, Phr, Utt = {s : Str} ; + + Imp = {s : Polarity => Number => Str} ; + S = {s : Str} ; QS = {s : QForm => Str} ; RS = {s : Agr => Str} ; @@ -20,7 +24,7 @@ concrete CatEng of Cat = open ResEng, Prelude in { V2, VV = Verb ** {c2 : Str} ; V3 = Verb ** {c2, c3 : Str} ; - AP = {s : Str ; isPre : Bool} ; + AP = {s : Agr => Str ; isPre : Bool} ; Comp = {s : Agr => Str} ; A = {s : AForm => Str} ; @@ -46,4 +50,14 @@ concrete CatEng of Cat = open ResEng, Prelude in { Numeral = {s : CardOrd => Str ; n : Number} ; + CAdv = {s : Str} ; + + Conj = {s : Str ; n : Number} ; + DConj = {s1,s2 : Str ; n : Number} ; + + SeqS = {s1,s2 : Str} ; + SeqAdv = {s1,s2 : Str} ; + SeqNP = {s1,s2 : Case => Str ; a : Agr} ; + SeqAP = {s1,s2 : Agr => Str ; isPre : Bool} ; + } diff --git a/lib/resource-1.0/gf/Conjunction.gf b/lib/resource-1.0/gf/Conjunction.gf new file mode 100644 index 000000000..10317eee2 --- /dev/null +++ b/lib/resource-1.0/gf/Conjunction.gf @@ -0,0 +1,15 @@ +abstract Conjunction = Sequence ** { + + fun + + ConjS : Conj -> SeqS -> S ; -- "John walks and Mary runs" + ConjAP : Conj -> SeqAP -> AP ; -- "even and prime" + ConjNP : Conj -> SeqNP -> NP ; -- "John or Mary" + ConjAdv : Conj -> SeqAdv -> Adv ; -- "quickly or slowly" + + DConjS : DConj -> SeqS -> S ; -- "either John walks or Mary runs" + DConjAP : DConj -> SeqAP -> AP ; -- "both even and prime" + DConjNP : DConj -> SeqNP -> NP ; -- "either John or Mary" + DConjAdv : DConj -> SeqAdv -> Adv ; -- "both badly and slowly" + +} diff --git a/lib/resource-1.0/gf/ConjunctionEng.gf b/lib/resource-1.0/gf/ConjunctionEng.gf new file mode 100644 index 000000000..899c04ce8 --- /dev/null +++ b/lib/resource-1.0/gf/ConjunctionEng.gf @@ -0,0 +1,26 @@ +concrete ConjunctionEng of Conjunction = + SequenceEng ** open ResEng, Coordination in { + + lin + + ConjS conj ss = {s = conjunctX conj ss} ; + DConjS conj ss = {s = conjunctDistrX conj ss} ; + + ConjAdv conj ss = {s = conjunctX conj ss} ; + DConjAdv conj ss = {s = conjunctDistrX conj ss} ; + + ConjNP conj ss = conjunctTable Case conj ss ** { + a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p} + } ; + DConjNP conj ss = conjunctDistrTable Case conj ss ** { + a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p} + } ; + + ConjAP conj ss = conjunctTable Agr conj ss ** { + isPre = ss.isPre + } ; + DConjAP conj ss = conjunctDistrTable Agr conj ss ** { + isPre = ss.isPre + } ; + +} diff --git a/lib/resource-1.0/gf/Lex.gf b/lib/resource-1.0/gf/Lex.gf index 1293fd83e..1571200b5 100644 --- a/lib/resource-1.0/gf/Lex.gf +++ b/lib/resource-1.0/gf/Lex.gf @@ -35,7 +35,20 @@ abstract Lex = Cat ** { very_AdA : AdA ; + always_AdV : AdV ; + one_Numeral, forty_Numeral : Numeral ; in_Prep, of_Prep : Prep ; + + and_Conj : Conj ; + either7or_DConj : DConj ; + + but_PConj : PConj ; + + if_Subj, because_Subj : Subj ; + + please_Voc : Voc ; + + more_CAdv, less_CAdv : CAdv ; } diff --git a/lib/resource-1.0/gf/LexEng.gf b/lib/resource-1.0/gf/LexEng.gf index d48e12077..440c48b22 100644 --- a/lib/resource-1.0/gf/LexEng.gf +++ b/lib/resource-1.0/gf/LexEng.gf @@ -17,6 +17,7 @@ concrete LexEng of Lex = CatEng ** open ResEng, Prelude in { here_Adv = {s = "here"} ; very_AdA = {s = "very"} ; + always_AdV = {s = "always"} ; only_Predet = {s = "only"} ; all_Predet = {s = "only"} ; @@ -43,4 +44,17 @@ concrete LexEng of Lex = CatEng ** open ResEng, Prelude in { in_Prep = {s = "in"} ; of_Prep = {s = "of"} ; + and_Conj = {s = "and" ; n = Pl} ; + either7or_DConj = {s1 = "either" ; s2 = "or" ; n = Sg} ; + + if_Subj = ss "if" ; + because_Subj = ss "because" ; + + but_PConj = {s = "but"} ; + + please_Voc = {s = "," ++ "please"} ; + + more_CAdv = ss "more" ; + less_CAdv = ss "less" ; + } diff --git a/lib/resource-1.0/gf/NounEng.gf b/lib/resource-1.0/gf/NounEng.gf index 3149a245c..5de8e2d40 100644 --- a/lib/resource-1.0/gf/NounEng.gf +++ b/lib/resource-1.0/gf/NounEng.gf @@ -32,7 +32,9 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in { ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c} ; ComplN3 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; c2 = f.c3} ; - AdjCN ap cn = {s = \\n,c => preOrPost ap.isPre ap.s (cn.s ! n ! c)} ; + AdjCN ap cn = { + s = \\n,c => preOrPost ap.isPre (ap.s ! (agrP3 n).a) (cn.s ! n ! c) + } ; RelCN cn rs = {s = \\n,c => cn.s ! n ! c ++ rs.s ! {n = n ; p = P3}} ; SentCN cn s = {s = \\n,c => cn.s ! n ! c ++ conjThat ++ s.s} ; diff --git a/lib/resource-1.0/gf/ParamX.gf b/lib/resource-1.0/gf/ParamX.gf index 61bb60c9a..a87c68a19 100644 --- a/lib/resource-1.0/gf/ParamX.gf +++ b/lib/resource-1.0/gf/ParamX.gf @@ -11,4 +11,17 @@ resource ParamX = { QForm = QDir | QIndir ; + oper + conjNumber : Number -> Number -> Number = \m,n -> + case of { + => Sg ; + _ => Pl + } ; + +-- For persons, we let the latter argument win ("either you or I am absent" +-- but "either I or you are absent"). This is not quite clear. + + conjPerson : Person -> Person -> Person = \_,p -> + p ; + } diff --git a/lib/resource-1.0/gf/Phrase.gf b/lib/resource-1.0/gf/Phrase.gf new file mode 100644 index 000000000..f7598f030 --- /dev/null +++ b/lib/resource-1.0/gf/Phrase.gf @@ -0,0 +1,21 @@ +abstract Phrase = Cat, Tense ** { + + fun + PhrUtt : PConj -> Utt -> Voc -> Phr ; + + UttS : S -> Utt ; + UttQS : QS -> Utt ; + UttImpSg, UttImpPl : Pol -> Imp -> Utt ; + + UttIP : IP -> Utt ; + UttIAdv : IAdv -> Utt ; + UttNP : NP -> Utt ; + UttAdv : Adv -> Utt ; + UttVP : VP -> Utt ; + + NoPConj : PConj ; + PConjConj : Conj -> PConj ; + + NoVoc : Voc ; + VocNP : NP -> Voc ; +} diff --git a/lib/resource-1.0/gf/PhraseEng.gf b/lib/resource-1.0/gf/PhraseEng.gf new file mode 100644 index 000000000..708660b01 --- /dev/null +++ b/lib/resource-1.0/gf/PhraseEng.gf @@ -0,0 +1,22 @@ +concrete PhraseEng of Phrase = CatEng, TenseX ** open ResEng in { + + lin + PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; + + UttS s = s ; + UttQS qs = {s = qs.s ! QDir} ; + UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ; + UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ; + + UttIP ip = {s = ip.s ! Nom} ; --- Acc also + UttIAdv iadv = iadv ; + UttNP np = {s = np.s ! Acc} ; + UttAdv adv = adv ; + + NoPConj = {s = []} ; + PConjConj conj = conj ; + + NoVoc = {s = []} ; + VocNP np = {s = "," ++ np.s ! Nom} ; + +} diff --git a/lib/resource-1.0/gf/ResEng.gf b/lib/resource-1.0/gf/ResEng.gf index e474e6e90..2399d15bd 100644 --- a/lib/resource-1.0/gf/ResEng.gf +++ b/lib/resource-1.0/gf/ResEng.gf @@ -2,13 +2,14 @@ resource ResEng = ParamX ** open Prelude in { param - Case = Nom | Acc | Gen ; + Case = Nom | Acc | Gen ; VForm = VInf | VPres | VPast | VPPart | VPresPart ; Ord = ODir | OQuest ; oper + Agr = {n : Number ; p : Person} ; agrP3 : Number -> {a : Agr} = \n -> {a = {n = n ; p = P3}} ; @@ -52,6 +53,8 @@ resource ResEng = ParamX ** open Prelude in { } } ; +-- For $Verb$. + Verb : Type = { s : VForm => Str } ; @@ -63,7 +66,7 @@ resource ResEng = ParamX ** open Prelude in { predV : Verb -> VP = \verb -> { s = \\t,ant,b,ord,agr => - let + let inf = verb.s ! VInf ; fin = presVerb verb agr ; past = verb.s ! VPast ; @@ -105,10 +108,10 @@ resource ResEng = ParamX ** open Prelude in { {fin = x ; inf = y} ; in case of { - => vf fin [] ; + => vf fin [] ; => vf (have agr) part ; => vf (havent agr) part ; - => vf fin [] ; + => vf fin [] ; => vf "had" part ; => vf "hadn't" part ; => vf "will" inf ; @@ -128,6 +131,11 @@ resource ResEng = ParamX ** open Prelude in { s2 = \\a => vp.s2 ! a ++ obj ! a } ; + insertAdV : Str -> VP -> VP = \adv,vp -> { + s = vp.s ; + s2 = vp.s2 + } ; + presVerb : {s : VForm => Str} -> Agr -> Str = \verb -> agrVerb (verb.s ! VPres) (verb.s ! VInf) ; @@ -148,7 +156,11 @@ resource ResEng = ParamX ** open Prelude in { Aux = {pres,past : Polarity => Agr => Str ; inf,ppart : Str} ; auxBe : Aux = { - pres = \\b,a => agrVerb (posneg b "is") (posneg b "are") a ; + pres = \\b,a => case of { + => "am" ; + => ["am not"] ; --- am not I + _ => agrVerb (posneg b "is") (posneg b "are") a + } ; past = \\b,a => agrVerb (posneg b "was") (posneg b "were") a ; inf = "be" ; ppart = "been" @@ -161,6 +173,15 @@ resource ResEng = ParamX ** open Prelude in { conjThat : Str = "that" ; + reflPron : Agr => Str = table { + {n = Sg ; p = P1} => "myself" ; + {n = Sg ; p = P2} => "yourself" ; + {n = Sg ; p = P3} => "itself" ; ---- + {n = Pl ; p = P1} => "ourselves" ; + {n = Pl ; p = P2} => "yourselves" ; + {n = Pl ; p = P3} => "themselves" + } ; + -- For $Adjective$. param @@ -181,6 +202,15 @@ oper param RAgr = RNoAg | RAg {n : Number ; p : Person} ; +-- For $Coord$. + +oper + conjAgr : Agr -> Agr -> Agr = \a,b -> { + n = conjNumber a.n b.n ; + p = conjPerson a.p b.p + } ; + + -- For $Numeral$. param diff --git a/lib/resource-1.0/gf/Sentence.gf b/lib/resource-1.0/gf/Sentence.gf index 337e27c4d..edf8c27e8 100644 --- a/lib/resource-1.0/gf/Sentence.gf +++ b/lib/resource-1.0/gf/Sentence.gf @@ -4,10 +4,10 @@ abstract Sentence = Cat ** { PredVP : NP -> VP -> Cl ; - SlashV2 : NP -> V2 -> Slash ; - - AdvSlash : Slash -> Adv -> Slash ; + ImpVP : VP -> Imp ; + SlashV2 : NP -> V2 -> Slash ; + AdvSlash : Slash -> Adv -> Slash ; SlashPrep : Cl -> Prep -> Slash ; } diff --git a/lib/resource-1.0/gf/SentenceEng.gf b/lib/resource-1.0/gf/SentenceEng.gf index 787e21254..3e15e707e 100644 --- a/lib/resource-1.0/gf/SentenceEng.gf +++ b/lib/resource-1.0/gf/SentenceEng.gf @@ -9,7 +9,7 @@ concrete SentenceEng of Sentence = CatEng ** open ResEng in { agr = np.a ; verb = vp.s ! t ! a ! b ! o ! agr ; subj = np.s ! Nom ; - compl = vp.s2 ! agr + compl = vp.s2 ! agr in case o of { ODir => subj ++ verb.fin ++ verb.inf ++ compl ; @@ -17,6 +17,19 @@ concrete SentenceEng of Sentence = CatEng ** open ResEng in { } } ; + ImpVP vp = { + s = \\pol,n => + let + agr = {n = n ; p = P2} ; + verb = infVP vp agr ; + dont = case pol of { + Neg => "don't" ; + _ => [] + } + in + dont ++ verb + } ; + SlashV2 np v2 = { s = \\t,a,b,o => let diff --git a/lib/resource-1.0/gf/Sequence.gf b/lib/resource-1.0/gf/Sequence.gf new file mode 100644 index 000000000..715c8f08e --- /dev/null +++ b/lib/resource-1.0/gf/Sequence.gf @@ -0,0 +1,13 @@ +abstract Sequence = Cat ** { + + fun + TwoS : S -> S -> SeqS ; + AddS : SeqS -> S -> SeqS ; + TwoAdv : Adv -> Adv -> SeqAdv ; + AddAdv : SeqAdv -> Adv -> SeqAdv ; + TwoNP : NP -> NP -> SeqNP ; + AddNP : SeqNP -> NP -> SeqNP ; + TwoAP : AP -> AP -> SeqAP ; + AddAP : SeqAP -> AP -> SeqAP ; + +} \ No newline at end of file diff --git a/lib/resource-1.0/gf/SequenceEng.gf b/lib/resource-1.0/gf/SequenceEng.gf new file mode 100644 index 000000000..844743161 --- /dev/null +++ b/lib/resource-1.0/gf/SequenceEng.gf @@ -0,0 +1,15 @@ +concrete SequenceEng of Sequence = + CatEng ** open ResEng, Coordination, Prelude in { + + lin + + TwoS = twoSS ; + AddS = consSS comma ; + TwoAdv = twoSS ; + AddAdv = consSS comma ; + TwoNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ; + AddNP xs x = consTable Case comma xs x ** {a = conjAgr xs.a x.a} ; + TwoAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; + AddAP xs x = consTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; + +} diff --git a/lib/resource-1.0/gf/Test.gf b/lib/resource-1.0/gf/Test.gf index bbb8b05d7..21b2c3452 100644 --- a/lib/resource-1.0/gf/Test.gf +++ b/lib/resource-1.0/gf/Test.gf @@ -2,10 +2,13 @@ abstract Test = Noun, Verb, Adjective, + Adverb, -- Numeral, Sentence, Question, Relative, + Conjunction, + Phrase, Untensed, -- Tensed, Lex diff --git a/lib/resource-1.0/gf/TestEng.gf b/lib/resource-1.0/gf/TestEng.gf index 02d906fc9..769c227bc 100644 --- a/lib/resource-1.0/gf/TestEng.gf +++ b/lib/resource-1.0/gf/TestEng.gf @@ -4,11 +4,18 @@ concrete TestEng of Test = NounEng, VerbEng, AdjectiveEng, + AdverbEng, -- NumeralEng, SentenceEng, QuestionEng, RelativeEng, + ConjunctionEng, + PhraseEng, UntensedEng, -- TensedEng, LexEng - ** {} ; + ** { + +flags startcat = Phr ; + +} ; diff --git a/lib/resource-1.0/gf/Verb.gf b/lib/resource-1.0/gf/Verb.gf index 1577adadb..67fded275 100644 --- a/lib/resource-1.0/gf/Verb.gf +++ b/lib/resource-1.0/gf/Verb.gf @@ -7,8 +7,14 @@ abstract Verb = Cat ** { ComplVV : VV -> VP -> VP ; ComplVS : VS -> S -> VP ; ComplVQ : VQ -> QS -> VP ; + + ReflV2 : V2 -> VP ; + PassV2 : V2 -> Comp ; --- overgen (V2 with prep) + UseComp : Comp -> VP ; - AdvVP : VP -> Adv -> VP ; + + AdvVP : VP -> Adv -> VP ; -- here + AdVVP : AdV -> VP -> VP ; -- always UseVV : VV -> V2 ; UseVQ : VQ -> V2 ; diff --git a/lib/resource-1.0/gf/VerbEng.gf b/lib/resource-1.0/gf/VerbEng.gf index de951c08c..0f99ea1ea 100644 --- a/lib/resource-1.0/gf/VerbEng.gf +++ b/lib/resource-1.0/gf/VerbEng.gf @@ -5,18 +5,24 @@ concrete VerbEng of Verb = CatEng ** open ResEng in { lin UseV = predV ; ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ; - ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ; ComplV3 v np np2 = insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ; ComplVV v vp = insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ; ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ; ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ; + UseComp comp = insertObj comp.s (predAux auxBe) ; + AdvVP vp adv = insertObj (\\_ => adv.s) vp ; +---- AdVVP adv vp = insertAdV adv.s vp ; + + ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ; + + PassV2 v = {s = \\_ => v.s ! VPPart} ; UseVV, UseVS, UseVQ = \vv -> {s = vv.s ; c2 = []} ; -- no "to" - CompAP ap = {s = \\_ => ap.s} ; + CompAP ap = ap ; CompNP np = {s = \\_ => np.s ! Acc} ; CompAdv a = {s = \\_ => a.s} ; diff --git a/lib/resource-1.0/gf/problems.txt b/lib/resource-1.0/gf/problems.txt new file mode 100644 index 000000000..f3d7726d7 --- /dev/null +++ b/lib/resource-1.0/gf/problems.txt @@ -0,0 +1,6 @@ +Serious problems with resource. + +29/11: Can't lin AdV properly (parsing; adverbs "always" relative to auxiliary) + +29/11/2005: ResEng.reflPron - not enough agreement features. +