From 752ab6dbc1b892dd075a95d051db40c56eb04926 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 17 Mar 2005 13:10:38 +0000 Subject: [PATCH] simplified adjectival predication --- lib/resource/abstract/Clause.gf | 7 - lib/resource/abstract/ClauseI.gf | 6 - lib/resource/abstract/Rules.gf | 7 +- lib/resource/abstract/Verbphrase.gf | 21 ++- lib/resource/english/CategoriesEng.gf | 4 +- lib/resource/english/ClauseEng.gf | 13 +- lib/resource/english/RulesEng.gf | 8 +- lib/resource/english/SyntaxEng.gf | 57 +++++--- lib/resource/english/VerbphraseEng.gf | 6 +- lib/resource/french/TimeFre.gf | 4 +- lib/resource/norwegian/TimeNor.gf | 4 +- lib/resource/romance/ClauseRomance.gf | 146 ++++--------------- lib/resource/romance/RulesRomance.gf | 6 +- lib/resource/romance/SyntaxRomance.gf | 43 ++++-- lib/resource/romance/VerbphraseRomance.gf | 10 +- lib/resource/scandinavian/RulesScand.gf | 6 +- lib/resource/scandinavian/SyntaxScand.gf | 34 +++-- lib/resource/scandinavian/VerbphraseScand.gf | 3 - lib/resource/swedish/TimeSwe.gf | 4 +- 19 files changed, 152 insertions(+), 237 deletions(-) diff --git a/lib/resource/abstract/Clause.gf b/lib/resource/abstract/Clause.gf index 32d0c686b..f26fd11d1 100644 --- a/lib/resource/abstract/Clause.gf +++ b/lib/resource/abstract/Clause.gf @@ -27,12 +27,9 @@ fun SPredV2Q : NP -> V2Q -> NP -> QS -> Cl ; -- "John asked me if it is good" SPredAP : NP -> AP -> Cl ; -- "John is old" - SPredSuperl : NP -> ADeg -> Cl ; -- "John is the oldest" SPredCN : NP -> CN -> Cl ; -- "John is a man" SPredNP : NP -> NP -> Cl ; -- "John is Bill" SPredAdv : NP -> Adv -> Cl ; -- "John is in France" - SPredAV : NP -> AV ->VPI ->Cl ; -- "John is eager to leave" - SPredObjA2V : NP -> A2V -> NP ->VPI ->Cl ; -- "John is easy for us to convince" SPredProgVP : NP -> VPI -> Cl ; -- "he is eating" @@ -52,13 +49,9 @@ fun QPredV2Q : IP -> V2Q -> NP -> QS -> QCl ; -- "who asked me if it is good" QPredAP : IP -> AP -> QCl ; -- "who is old" - QPredSuperl : IP -> ADeg -> QCl ; -- "who is the oldest" QPredCN : IP -> CN -> QCl ; -- "who is a man" QPredNP : IP -> NP -> QCl ; -- "who is Bill" QPredAdv : IP -> Adv -> QCl ; -- "who is in France" - QPredAV : IP -> AV ->VPI ->QCl ; -- "who is eager to leave" - QPredObjA2V : IP -> A2V -> NP ->VPI ->QCl ; -- "who is easy for us to convince" - IPredV : Ant -> V -> VPI ; -- "walk" IPredV2 : Ant -> V2 -> NP -> VPI ; -- "see Mary" diff --git a/lib/resource/abstract/ClauseI.gf b/lib/resource/abstract/ClauseI.gf index 77ab0a852..d769660ba 100644 --- a/lib/resource/abstract/ClauseI.gf +++ b/lib/resource/abstract/ClauseI.gf @@ -22,12 +22,9 @@ incomplete concrete ClauseI of Clause = open Rules, Verbphrase in { SPredV2Q np v x y = PredVP np (ComplV2Q v x y) ; SPredAP np v = PredVP np (PredAP v) ; - SPredSuperl np a = PredVP np (PredSuperl a) ; SPredCN np v = PredVP np (PredCN v) ; SPredNP np v = PredVP np (PredNP v) ; SPredAdv np v = PredVP np (PredAdv v) ; - SPredAV np v x = PredVP np (PredAV v x) ; - SPredObjA2V np v x y = PredVP np (PredObjA2V v x y) ; SPredProgVP np vp = PredVP np (PredProgVP vp) ; @@ -46,12 +43,9 @@ incomplete concrete ClauseI of Clause = open Rules, Verbphrase in { QPredV2Q np v x y = IntVP np (ComplV2Q v x y) ; QPredAP np v = IntVP np (PredAP v) ; - QPredSuperl np a = IntVP np (PredSuperl a) ; QPredCN np v = IntVP np (PredCN v) ; QPredNP np v = IntVP np (PredNP v) ; QPredAdv np v = IntVP np (PredAdv v) ; - QPredAV np v x = IntVP np (PredAV v x) ; - QPredObjA2V np v x y = IntVP np (PredObjA2V v x y) ; IPredV a v = PosVP a (UseV v) ; IPredV2 a v x = PosVP a (ComplV2 v x) ; diff --git a/lib/resource/abstract/Rules.gf b/lib/resource/abstract/Rules.gf index 395dfb40e..e5c757048 100644 --- a/lib/resource/abstract/Rules.gf +++ b/lib/resource/abstract/Rules.gf @@ -53,7 +53,10 @@ fun PositADeg : ADeg -> AP ; -- "old" ComparADeg : ADeg -> NP -> AP ; -- "older than John" - SuperlNP : ADeg -> CN -> NP ; -- "the oldest man" + SuperlADeg : ADeg -> AP ; -- "the oldest" + + ComplAV : AV -> VPI -> AP ; -- "eager to leave" + ComplObjA2V : A2V -> NP -> VPI -> AP ; -- "easy for us to convince" @@ -103,7 +106,7 @@ fun -- -- Here is how complex adverbs can be formed and used. - AdjAdv : AP -> Adv ; -- "freely", "more consciously than you" + AdjAdv : A -> Adv ; -- "freely" AdvPP : PP -> Adv ; -- "in London", "after the war" PrepNP : Prep -> NP -> PP ; -- "in London", "after the war" diff --git a/lib/resource/abstract/Verbphrase.gf b/lib/resource/abstract/Verbphrase.gf index 9f160ac9a..301890b2c 100644 --- a/lib/resource/abstract/Verbphrase.gf +++ b/lib/resource/abstract/Verbphrase.gf @@ -18,15 +18,15 @@ abstract Verbphrase = Categories ** { -- These rules produce verb phrases. fun - UseV : V -> VP ; -- "walks" - UsePassV : V -> VP ; -- "is seen" - ComplV2 : V2 -> NP -> VP ; -- "sees Mary" - ComplV3 : V3 -> NP -> NP -> VP ; -- "tells Mary everything" - ComplReflV2 : V2 -> VP ; -- "loves himself" - ComplVS : VS -> S -> VP ; -- "says that Mary runs" - ComplVV : VV -> VPI -> VP ; -- "must walk" - ComplVQ : VQ -> QS -> VP ; -- "asks who will come" - ComplVA : VA -> AP -> VP ; -- "looks ill" + UseV : V -> VP ; -- "walks" + UsePassV : V -> VP ; -- "is seen" + ComplV2 : V2 -> NP -> VP ; -- "sees Mary" + ComplV3 : V3 -> NP -> NP -> VP ; -- "tells Mary everything" + ComplReflV2 : V2 -> VP ; -- "loves himself" + ComplVS : VS -> S -> VP ; -- "says that Mary runs" + ComplVV : VV -> VPI -> VP ; -- "must walk" + ComplVQ : VQ -> QS -> VP ; -- "asks who will come" + ComplVA : VA -> AP -> VP ; -- "looks ill" ComplV2A : V2A -> NP -> AP -> VP ; -- "paints the house red" ComplSubjV2V : V2V -> NP -> VPI -> VP ; -- "promises Mary to leave" ComplObjV2V : V2V -> NP -> VPI -> VP ; -- "asked him to go" @@ -34,12 +34,9 @@ abstract Verbphrase = Categories ** { ComplV2Q : V2Q -> NP -> QS -> VP ; -- "asks me if you come" PredAP : AP -> VP ; -- "is old" - PredSuperl : ADeg -> VP ; -- "is the oldest" PredCN : CN -> VP ; -- "is a man" PredNP : NP -> VP ; -- "is Bill" PredAdv : Adv -> VP ; -- "is in France", "is here" - PredAV : AV -> VPI -> VP ; -- "is eager to leave" - PredObjA2V : A2V -> NP -> VPI -> VP ; -- "is easy for us to convince" PredProgVP : VPI -> VP ; -- "is eating fish" diff --git a/lib/resource/english/CategoriesEng.gf b/lib/resource/english/CategoriesEng.gf index eda6cf4aa..923c3159d 100644 --- a/lib/resource/english/CategoriesEng.gf +++ b/lib/resource/english/CategoriesEng.gf @@ -45,7 +45,7 @@ lincat -- = {s : AForm => Str} A2 = Adjective ** {s2 : Preposition} ; ADeg = {s : Degree => AForm => Str} ; - AP = Adjective ** {p : Bool} ; + AP = {s : Agr => Str ; p : Bool} ; AS = Adjective ; --- "more difficult for him to come than..." A2S = Adjective ** {s2 : Preposition} ; AV = Adjective ; @@ -102,7 +102,7 @@ lincat ConjD = {s1 : Str ; s2 : Str ; n : Number} ; ListS = {s1 : Str ; s2 : Str} ; - ListAP = {s1,s2 : AForm => Str ; p : Bool} ; + ListAP = {s1,s2 : Agr => Str ; p : Bool} ; ListNP = {s1,s2 : NPForm => Str ; a : Agr} ; ListAdv = {s1 : Str ; s2 : Str} ; diff --git a/lib/resource/english/ClauseEng.gf b/lib/resource/english/ClauseEng.gf index b7b2701f4..08080faa0 100644 --- a/lib/resource/english/ClauseEng.gf +++ b/lib/resource/english/ClauseEng.gf @@ -22,15 +22,11 @@ concrete ClauseEng of Clause = CategoriesEng ** SPredV2S np v x y = predVerbClause np v (complDitransSentVerb v x y) ; SPredV2Q np v x y = predVerbClause np v (complDitransQuestVerb v x y) ; - SPredAP np v = predBeGroup np (complAdjective v) ; - SPredSuperl np a = predBeGroup np (complAdjective (superlAdjPhrase a)) ; + SPredAP np v = predBeGroup np v.s ; SPredCN np v = predBeGroup np (complCommNoun v) ; SPredNP np v = predBeGroup np (complNounPhrase v) ; SPredAdv np v = predBeGroup np (complAdverb v) ; - SPredAV np v x = predBeGroup np (complVerbAdj v x) ; - SPredObjA2V np v x y = predBeGroup np (complVerbAdj2 True v x y) ; - SPredProgVP = progressiveClause ; QPredV np v = intVerbClause np v (complVerb v) ; @@ -49,18 +45,15 @@ concrete ClauseEng of Clause = CategoriesEng ** QPredV2S np v x y = intVerbClause np v (complDitransSentVerb v x y) ; QPredV2Q np v x y = intVerbClause np v (complDitransQuestVerb v x y) ; - QPredAP np v = predBeGroupQ np (complAdjective v) ; - QPredSuperl np a = predBeGroupQ np (complAdjective (superlAdjPhrase a)) ; + QPredAP np v = predBeGroupQ np v.s ; QPredCN np v = predBeGroupQ np (complCommNoun v) ; QPredNP np v = predBeGroupQ np (complNounPhrase v) ; QPredAdv np v = predBeGroupQ np (complAdverb v) ; - QPredAV np v x = predBeGroupQ np (complVerbAdj v x) ; - QPredObjA2V np v x y = predBeGroupQ np (complVerbAdj2 True v x y) ; IPredV a v = predVerbI True a v (complVerb v) ; IPredV2 a v x = predVerbI True a v (complTransVerb v x) ; - IPredAP a v = predBeGroupI True a (complAdjective v) ; + IPredAP a v = predBeGroupI True a v.s ; {- -- Use VPs diff --git a/lib/resource/english/RulesEng.gf b/lib/resource/english/RulesEng.gf index a47f295eb..fe934e7b9 100644 --- a/lib/resource/english/RulesEng.gf +++ b/lib/resource/english/RulesEng.gf @@ -66,9 +66,12 @@ lin UseA = adj2adjPhrase ; ComplA2 = complAdj ; - PositADeg = positAdjPhrase ; + ComplAV v x = complVerbAdj v x ; + ComplObjA2V v x y = complVerbAdj2 True v x y ; + + PositADeg = positAdjPhrase ; ComparADeg = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; + SuperlADeg = superlAdjPhrase ; -- verbs and verb prases @@ -78,7 +81,6 @@ lin -- Partial saturation. UseV2 = transAsVerb ; ----- ComplV3 = complDitransVerb ; ComplA2S = predAdjSent2 ; diff --git a/lib/resource/english/SyntaxEng.gf b/lib/resource/english/SyntaxEng.gf index fd2f76831..176b463df 100644 --- a/lib/resource/english/SyntaxEng.gf +++ b/lib/resource/english/SyntaxEng.gf @@ -196,9 +196,14 @@ oper -- Adjectival phrases have a parameter $p$ telling if they are prefixed ($True$) or -- postfixed (complex APs). - AdjPhrase : Type = Adjective ** {p : Bool} ; + AdjPhrase : Type = {s : Agr => Str ; p : Bool} ; - adj2adjPhrase : Adjective -> AdjPhrase = \new -> new ** {p = True} ; + noAPAgr : Agr = ASgP2 ; + + adj2adjPhrase : Adjective -> AdjPhrase = \new -> + {s = \\_ => new.s ! AAdj ; + p = True + } ; simpleAdjPhrase : Str -> AdjPhrase = \French -> adj2adjPhrase (regAdjective French) ; @@ -217,7 +222,7 @@ oper -- adjectival phrases ("bigger then you"). comparAdjPhrase : AdjDegr -> NounPhrase -> AdjPhrase = \big, you -> - {s = \\a => big.s ! Comp ! a ++ "than" ++ you.s ! NomP ; + {s = \\_ => big.s ! Comp ! AAdj ++ "than" ++ you.s ! NomP ; p = False } ; @@ -233,7 +238,7 @@ oper -- ("the youngest" - in free variation). superlAdjPhrase : AdjDegr -> AdjPhrase = \big -> - {s = \\a => "the" ++ big.s ! Sup ! a ; + {s = \\_ => "the" ++ big.s ! Sup ! AAdj ; p = True } ; @@ -247,7 +252,7 @@ oper AdjCompl = Adjective ** {s2 : Preposition} ; complAdj : AdjCompl -> NounPhrase -> AdjPhrase = \related,john -> - {s = \\a => related.s ! a ++ related.s2 ++ john.s ! AccP ; + {s = \\a => related.s ! AAdj ++ related.s2 ++ john.s ! AccP ; p = False } ; @@ -263,8 +268,12 @@ oper modCommNounPhrase : AdjPhrase -> CommNounPhrase -> CommNounPhrase = \big, car -> {s = \\n => if_then_else (Case => Str) big.p - (\\c => big.s ! AAdj ++ car.s ! n ! c) - (table {Nom => car.s ! n ! Nom ++ big.s ! AAdj ; Gen => variants {}}) ; + (\\c => big.s ! noAPAgr ++ car.s ! n ! c) + (\\c => car.s ! n ! Nom ++ big.s ! noAPAgr ++ case c of { + Nom => [] ; + Gen => "'s" --- detached clitic + } + ) ; g = car.g } ; @@ -537,7 +546,7 @@ oper -- The syntax is the same as for adjectival predication. passVerb : Verb -> Complement = \love -> - complAdjective (adj2adjPhrase (regAdjective (love.s ! PPart))) ; + complAdjective (regAdjective (love.s ! PPart)) ; -- Transitive verbs can also be used reflexively. -- But to formalize this we must make verb phrases depend on a person parameter. @@ -570,13 +579,14 @@ oper TransVerb -> NounPhrase -> AdjPhrase -> Complement = \gor,dig,sur -> mkComp gor - (\\_ => gor.s1 ++ gor.s3 ++ dig.s ! AccP ++ sur.s ! AAdj) ; + (\\_ => gor.s1 ++ gor.s3 ++ dig.s ! AccP ++ sur.s ! noAPAgr) ; + ---- should be agr a; make mkComp more general complAdjVerb : Verb -> AdjPhrase -> Complement = \seut,sur -> mkComp seut - (\\n => sur.s ! AAdj ++ seut.s1) ; + (\\n => sur.s ! noAPAgr ++ seut.s1) ; --2 Adverbs @@ -917,23 +927,26 @@ oper (simma.s ! VIInfinit ! a) ) ; - complVerbAdj : Adjective -> VerbPhrase -> Complement = \grei, simma -> - (\\a => + complVerbAdj : Adjective -> VerbPhrase -> AdjPhrase = \grei, simma -> + {s = \\a => grei.s ! AAdj ++ simma.s1 ++ "to" ++ - simma.s ! VIInfinit ! a) ; + simma.s ! VIInfinit ! a ; + p = False + } ; complVerbAdj2 : - Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> Complement = + Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> AdjPhrase = \obj,grei,dig,simma -> - (\\a => + {s = \\a => grei.s ! AAdj ++ grei.s2 ++ dig.s ! AccP ++ simma.s1 ++ "to" ++ if_then_Str obj (simma.s ! VIInfinit ! dig.a) - (simma.s ! VIInfinit ! a) - ) ; + (simma.s ! VIInfinit ! a) ; + p = False + } ; --2 Sentences missing noun phrases @@ -1323,20 +1336,20 @@ oper -- The structure is the same as for sentences. The result is a prefix adjective -- if and only if all elements are prefix. - ListAdjPhrase : Type = {s1,s2 : AForm => Str ; p : Bool} ; + ListAdjPhrase : Type = {s1,s2 : Agr => Str ; p : Bool} ; twoAdjPhrase : (_,_ : AdjPhrase) -> ListAdjPhrase = \x,y -> - CO.twoTable AForm x y ** {p = andB x.p y.p} ; + CO.twoTable Agr x y ** {p = andB x.p y.p} ; consAdjPhrase : ListAdjPhrase -> AdjPhrase -> ListAdjPhrase = \xs,x -> - CO.consTable AForm CO.comma xs x ** {p = andB xs.p x.p} ; + CO.consTable Agr CO.comma xs x ** {p = andB xs.p x.p} ; conjunctAdjPhrase : Conjunction -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctTable AForm c xs ** {p = xs.p} ; + CO.conjunctTable Agr c xs ** {p = xs.p} ; conjunctDistrAdjPhrase : ConjunctionDistr -> ListAdjPhrase -> AdjPhrase = \c,xs -> - CO.conjunctDistrTable AForm c xs ** {p = xs.p} ; + CO.conjunctDistrTable Agr c xs ** {p = xs.p} ; --3 Coordinating noun phrases diff --git a/lib/resource/english/VerbphraseEng.gf b/lib/resource/english/VerbphraseEng.gf index d3847948a..ec6cc49c7 100644 --- a/lib/resource/english/VerbphraseEng.gf +++ b/lib/resource/english/VerbphraseEng.gf @@ -38,15 +38,11 @@ concrete VerbphraseEng of Verbphrase = CategoriesEng ** ComplV2S v x y = predClauseGroup v (complDitransSentVerb v x y) ; ComplV2Q v x y = predClauseGroup v (complDitransQuestVerb v x y) ; - PredAP v = predClauseBeGroup (complAdjective v) ; - PredSuperl a = predClauseBeGroup (complAdjective (superlAdjPhrase a)) ; + PredAP v = predClauseBeGroup v.s ; PredCN v = predClauseBeGroup (complCommNoun v) ; PredNP v = predClauseBeGroup (complNounPhrase v) ; PredAdv v = predClauseBeGroup (complAdverb v) ; - PredAV v x = predClauseBeGroup (complVerbAdj v x) ; - PredObjA2V v x y = predClauseBeGroup (complVerbAdj2 True v x y) ; - PredProgVP = progressiveVerbPhrase ; ---- SPredProgVP = progressiveClause ; diff --git a/lib/resource/french/TimeFre.gf b/lib/resource/french/TimeFre.gf index 97c195f99..a7ab16256 100644 --- a/lib/resource/french/TimeFre.gf +++ b/lib/resource/french/TimeFre.gf @@ -17,8 +17,8 @@ PastTime h m = ss (m.s ++ "et" ++ h.s) ; ToTime h m = ss (h.s ++ "moins" ++ m.s) ; ExactTime h = ss (h.s ++ "exactement") ; -NumHour n = ss (n.s ! indep) ; -NumMinute n = ss (n.s ! indep) ; +NumHour n = ss (n.s ! feminine ! indep) ; +NumMinute n = ss (n.s ! feminine ! indep) ; monday = regN "lundi" masculine ; tuesday = regN "mardi" masculine ; diff --git a/lib/resource/norwegian/TimeNor.gf b/lib/resource/norwegian/TimeNor.gf index c7c2f5dc8..b6085249a 100644 --- a/lib/resource/norwegian/TimeNor.gf +++ b/lib/resource/norwegian/TimeNor.gf @@ -17,8 +17,8 @@ PastTime h m = ss (m.s ++ "over" ++ h.s) ; ToTime h m = ss (m.s ++ "på" ++ h.s) ; ExactTime h = ss (h.s ++ "akkurat") ; -NumHour n = n ; -NumMinute n = n ; +NumHour n = {s = n.s ! Neutr} ; +NumMinute n = {s = n.s ! Neutr} ; monday = regN "mandag" masculine ; tuesday = regN "tirsdag" masculine ; diff --git a/lib/resource/romance/ClauseRomance.gf b/lib/resource/romance/ClauseRomance.gf index 9a23e1eee..093a41e74 100644 --- a/lib/resource/romance/ClauseRomance.gf +++ b/lib/resource/romance/ClauseRomance.gf @@ -25,20 +25,42 @@ incomplete concrete ClauseRomance of Clause = CategoriesRomance ** SPredVS subj verb sent = sats2clause ( - insertExtrapos (mkSats subj verb) (embedConj ++ sent.s ! verb.mp)) ; ---- mn + insertExtrapos (mkSats subj verb) + (\\b => embedConj ++ sent.s ! subordMode verb b)) ; ---- mn SPredVQ subj verb quest = sats2clause ( - insertExtrapos (mkSats subj verb) (quest.s ! IndirQ)) ; + insertExtrapos (mkSats subj verb) (\\_ => quest.s ! IndirQ)) ; SPredV2S subj verb obj sent = sats2clause ( insertExtrapos (mkSatsObject subj verb obj) - (embedConj ++ sent.s ! verb.mp)) ; ---- mn ; + (\\b => embedConj ++ sent.s ! subordMode verb b) + ) ; ---- mn ; SPredV2Q subj verb obj quest = sats2clause ( insertExtrapos (mkSatsObject subj verb obj) - (quest.s ! IndirQ)) ; + (\\_ => quest.s ! IndirQ)) ; + SPredVA subj verb adj = + sats2clause ( + insertExtrapos (mkSats subj verb) (\\_ => adj.s ! AF (pgen2gen subj.g) subj.n)) ; + + SPredVV subj verb vp = + sats2clause ( + insertExtrapos + (mkSats subj verb) + (\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! pgen2gen subj.g ! subj.n ! subj.p) + ) ; + +-- SPredObjV2V + +-- SPredProgVP + +-- SPredSubjV2V + +-- SPredV2A + + SPredAP subj adj = sats2clause (mkSatsCopula subj (adj.s ! AF (pgen2gen subj.g) subj.n)) ; SPredCN subj cn = @@ -48,54 +70,6 @@ incomplete concrete ClauseRomance of Clause = CategoriesRomance ** SPredAdv subj adv = sats2clause (mkSatsCopula subj adv.s) ; -{- - - SPredVA np v x = predVerbClause np v (complAdjVerb v x) ; - SPredV2A np v x y = predVerbClause np v (complDitransAdjVerb v x y) ; - SPredSubjV2V np v x y = predVerbClause np v (complDitransVerbVerb False v x y) ; - SPredObjV2V np v x y = predVerbClause np v (complDitransVerbVerb True v x y) ; --- SPredV2S np v x y = predVerbClause np v (complDitransSentVerb v x y) ; --- SPredV2Q np v x y = predVerbClause np v (complDitransQuestVerb v x y) ; - SPredAP np v = predCopula np (complAdjective v) ; - SPredSuperl np a = predCopula np (complAdjective (superlAdjPhrase a)) ; - SPredCN np v = predCopula np (complCommNoun v) ; - SPredNP np v = predCopula np (complNounPhrase v) ; - SPredPP np v = predCopula np (complAdverb v) ; - SPredAV np v x = predCopula np (complVerbAdj v x) ; - - SPredObjA2V np v x y = predCopula np (complVerbAdj2 True v x y) ; - - SPredProgVP = progressiveClause ; - - QPredV np v = intVerbClause np v (complVerb v) ; - QPredPassV np v = predCopulaQ np (passVerb v) ; - QPredV2 np v x = intVerbClause np v (complTransVerb v x) ; --- QPredReflV2 np v = intVerbClause np v (reflTransVerb v) ; - QPredVS np v x = intVerbClause np v (complSentVerb v x) ; - QPredVV np v x = intVerbClause np (aux2verb v) (complVerbVerb v x) ; - QPredVQ np v x = intVerbClause np v (complQuestVerb v x) ; - QPredVA np v x = intVerbClause np v (complAdjVerb v x) ; - QPredV2A np v x y = intVerbClause np v (complDitransAdjVerb v x y) ; - QPredSubjV2V np v x y = intVerbClause np v (complDitransVerbVerb - False v x y) ; - QPredObjV2V np v x y = intVerbClause np v (complDitransVerbVerb - True v x y) ; - QPredV2S np v x y = intVerbClause np v (complDitransSentVerb v x y) ; - QPredV2Q np v x y = intVerbClause np v (complDitransQuestVerb v x y) ; - - QPredAP np v = predCopulaQ np (complAdjective v) ; - QPredSuperl np a = predCopulaQ np (complAdjective (superlAdjPhrase a)) ; - QPredCN np v = predCopulaQ np (complCommNoun v) ; - QPredNP np v = predCopulaQ np (complNounPhrase v) ; - QPredPP np v = predCopulaQ np (complAdverb v) ; - QPredAV np v x = predCopulaQ np (complVerbAdj v x) ; - QPredObjA2V np v x y = predCopulaQ np (complVerbAdj2 True v x y) ; - - IPredV a v = predVerbI True a v (complVerb v) ; - IPredV2 a v x = predVerbI True a v (complTransVerb v x) ; - - IPredAP a v = predCopulaI True a (complAdjective v) ; --} {- -- Use VPs @@ -113,72 +87,4 @@ incomplete concrete ClauseRomance of Clause = CategoriesRomance ** -{- - lin - SPredV np v = predVerbGroupClause np (predVerb v) ; - SPredPassV np v = predVerbGroupClause np (passVerb v) ; - SPredV2 np v x = predVerbGroupClause np (complTransVerb v x) ; --- SPredReflV2 np v = predVerbGroupClause np (reflTransVerb v) ; - SPredVS np v x = predVerbGroupClause np (complSentVerb v x) ; --- SPredVV np v x = predVerbGroupClause np (complVerbVerb v x) ; --- SPredVQ np v x = predVerbGroupClause np (complQuestVerb v x) ; --- SPredVA np v x = predVerbGroupClause np (complAdjVerb v x) ; --- SPredV2A np v x y = predVerbGroupClause np (complDitransAdjVerb v x y) ; --- SPredSubjV2V np v x y = predVerbGroupClause np (complDitransVerbVerb False v x y) ; --- SPredObjV2V np v x y = predVerbGroupClause np (complDitransVerbVerb True v x y) ; --- SPredV2S np v x y = predVerbGroupClause np (complDitransSentVerb v x y) ; --- SPredV2Q np v x y = predVerbGroupClause np (complDitransQuestVerb v x y) ; - - SPredAP np v = predVerbGroupClause np (predAdjective v) ; - SPredSuperl np a = predVerbGroupClause np (predAdjective (superlAdjPhrase a)) ; - SPredCN np v = predVerbGroupClause np (predCommNoun v) ; - SPredNP np v = predVerbGroupClause np (predNounPhrase v) ; - SPredPP np v = predVerbGroupClause np (predAdverb v) ; --- SPredAV np v x = predVerbGroupClause np (complVerbAdj v x) ; --- SPredObjA2V np v x y = predVerbGroupClause np (complVerbAdj2 True v x y) ; --} --- SPredProgVP = progressiveClause ; - -{- - QPredV np v = intVerbPhrase np (predVerb v) ; - QPredPassV np v = intVerbPhrase np (passVerb v) ; - QPredV2 np v x = intVerbPhrase np (complTransVerb v x) ; --- QPredReflV2 np v = intVerbPhrase np (reflTransVerb v) ; - QPredVS np v x = intVerbPhrase np (complSentVerb v x) ; - QPredVV np v x = intVerbPhrase np (complVerbVerb v x) ; --- QPredVQ np v x = intVerbPhrase np (complQuestVerb v x) ; --- QPredVA np v x = intVerbPhrase np (complAdjVerb v x) ; --- QPredV2A np v x y = intVerbPhrase np (complDitransAdjVerb v x y) ; --- QPredSubjV2V np v x y = intVerbPhrase np (complDitransVerbVerb False v x y) ; --- QPredObjV2V np v x y = intVerbPhrase np (complDitransVerbVerb True v x y) ; --- QPredV2S np v x y = intVerbPhrase np (complDitransSentVerb v x y) ; --- QPredV2Q np v x y = intVerbPhrase np (complDitransQuestVerb v x y) ; - - QPredAP np v = intVerbPhrase np (predAdjective v) ; - QPredSuperl np a = intVerbPhrase np (predAdjective (superlAdjPhrase a)) ; - QPredCN np v = intVerbPhrase np (predCommNoun v) ; - QPredNP np v = intVerbPhrase np (predNounPhrase v) ; - QPredPP np v = intVerbPhrase np (predAdverb v) ; --- QPredAV np v x = intVerbPhrase np (complVerbAdj v x) ; --- QPredObjA2V np v x y = intVerbPhrase np (complVerbAdj2 True v x y) ; --} --- IPredV a v = predVerbGroupI True a (predVerb v) ; --- IPredV2 a v x = predVerbGroupI True a (complTransVerb v x) ; --- IPredAP a v = predVerbGroupI True a (predAdjective v) ; - -{- --- Use VPs - - PredVP = predVerbGroupClause ; - IntVP = intVerbPhrase ; - RelVP = relVerbPhrase ; - - - PosVP tp = predVerbGroup True tp.a ; - NegVP tp = predVerbGroup False tp.a ; - - AdvVP = adVerbPhrase ; - SubjVP = subjunctVerbPhrase ; --} - } diff --git a/lib/resource/romance/RulesRomance.gf b/lib/resource/romance/RulesRomance.gf index 9e6bca5b9..525d5a29c 100644 --- a/lib/resource/romance/RulesRomance.gf +++ b/lib/resource/romance/RulesRomance.gf @@ -40,10 +40,12 @@ lin UseA = adj2adjPhrase ; ComplA2 = complAdj ; + ComplAV v x = complVerbAdj v x ; + ComplObjA2V v x y = complVerbAdj2 True v x y ; - PositADeg = positAdjPhrase ; + PositADeg = positAdjPhrase ; ComparADeg = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; + SuperlADeg = superlAdjPhrase ; PredAS = predAdjSent ; PredV0 rain = predVerbClause (pronNounPhrase pronImpers) rain (complVerb rain) ; diff --git a/lib/resource/romance/SyntaxRomance.gf b/lib/resource/romance/SyntaxRomance.gf index 7531f698f..78b33a05d 100644 --- a/lib/resource/romance/SyntaxRomance.gf +++ b/lib/resource/romance/SyntaxRomance.gf @@ -500,17 +500,22 @@ oper complAdverb : Adverb -> Complemnt = \dehors -> complCopula (\\_,_,_ => dehors.s) ; - complVerbAdj : AdjCompl -> VerbPhrase -> Complemnt = \facile,ouvrir -> - complCopula (\\g,n,p => - facile.s ! AF g n ++ prepCase facile.c ++ facile.s2 ++ - ouvrir.s ! VIInfinit ! g ! n ! p) ; + complVerbAdj : AdjCompl -> VerbPhrase -> AdjPhrase = \facile,ouvrir -> + {s = \\gn => ---- p + facile.s ! gn ++ prepCase facile.c ++ facile.s2 ++ + ouvrir.s ! VIInfinit ! Masc ! Sg ! P3 ; + p = False + } ; - complVerbAdj2 : Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> Complemnt = + complVerbAdj2 : Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> AdjPhrase = \b,facile,lui,nager -> - complTransVerbGen (copula ** {c = dative ; s2=[]}) lui - (\\g,n,p => - facile.s ! AF g n ++ prepCase facile.c ++ facile.s2 ++ - nager.s ! VIInfinit ! g ! n ! p) ; ---- agr dep on b + {s = \\gn => ---- p + facile.s ! gn ++ + lui.s ! stressed dative ++ ---- also "pour lui" ? + prepCase facile.c ++ facile.s2 ++ + nager.s ! VIInfinit ! pgen2gen lui.g ! lui.n ! P3 ; ---- agr dep on b + p = False + } ; progressiveVerbPhrase : VerbPhrase -> VerbGroup ; @@ -584,7 +589,7 @@ oper in \\g,n,p => let - soi = reflPron ! n ! p ! (case2pformClit aime.c) ; + soi = reflPron ! n ! p ! unstressed accusative ; ---- (case2pformClit aime.c) ; aimee = aime.s ! VPart g n in case clit of { @@ -870,6 +875,9 @@ oper SentenceVerb : Type = Verb ** {mp, mn : Mode} ; + subordMode : SentenceVerb -> Bool -> Mode = \verb,b -> + if_then_else Mode b verb.mp verb.mn ; + complSentVerb : SentenceVerb -> Sentence -> Complemnt = \croire,jeanboit -> mkCompl croire @@ -1429,6 +1437,7 @@ oper s4 : VF => Str ; -- ai ai s5 : Str ; -- toujours (pas) toujours (pas) s6 : Str ; -- (dit) directement (voulu) le lui dire directement + s7 : Bool => Str; -- qu'il pleu/pleuve aux : VAux ; g,g2 : Gender ; -- features for main verb and participle n,n2 : Number ; @@ -1473,6 +1482,7 @@ oper s3 = [] ; s4 = verb.s ; s5, s6 = [] ; + s7 = \\_ => [] ; aux = verb.aux ; g = pgen2gen subj.g ; n = subj.n ; @@ -1494,6 +1504,7 @@ oper s4 = sats.s4 ; s5 = sats.s5 ; s6 = sats.s6 ++ prep ++ np ; + s7 = sats.s7 ; aux = sats.aux ; g = sats.g ; n = sats.n ; @@ -1502,12 +1513,13 @@ oper p = sats.p } ; - insertExtrapos : Sats -> Str -> Sats = \sats,obj -> + insertExtrapos : Sats -> (Bool => Str) -> Sats = \sats,obj -> {s1 = sats.s1 ; s3 = sats.s3 ; s4 = sats.s4 ; s5 = sats.s5 ; - s6 = sats.s6 ++ obj ; + s6 = sats.s6 ; + s7 = obj ; aux = sats.aux ; g = sats.g ; n = sats.n ; @@ -1535,10 +1547,11 @@ oper dit = dire.p2 ; toujours = sats.s5 ; directement = sats.s6 ; - ne = if_then_Str b [] "ne" ; ---- negNe ; - pas = if_then_Str b [] "pas" ---- negPas + ne = if_then_Str b [] "ne" ; ---- negNe ; + pas = if_then_Str b [] "pas" ; ---- negPas ; + oui = sats.s7 ! b in - je ++ ne ++ lui ++ ai ++ toujours ++ pas ++ dit ++ directement + je ++ ne ++ lui ++ ai ++ toujours ++ pas ++ dit ++ directement ++ oui } ; } diff --git a/lib/resource/romance/VerbphraseRomance.gf b/lib/resource/romance/VerbphraseRomance.gf index 874b18fdb..5a1024d56 100644 --- a/lib/resource/romance/VerbphraseRomance.gf +++ b/lib/resource/romance/VerbphraseRomance.gf @@ -29,26 +29,22 @@ incomplete concrete VerbphraseRomance of Verbphrase = CategoriesRomance ** UsePassV v = predClauseBeGroup (passVerb v) ; ComplV2 v x = predClauseGroup v (complTransVerb v x) ; ComplV3 v x y = predClauseGroup v (complDitransVerb v x y) ; ----- ComplReflV2 v = predClauseGroup v (reflTransVerb v) ; + ComplReflV2 v = predClauseGroup v (reflTransVerb v) ; ComplVS v x = predClauseGroup v (complSentVerb v x) ; ComplVV v x = predClauseGroup v (complVerbVerb v x) ; ComplVQ v x = predClauseGroup v (complQuestVerb v x) ; ComplVA v x = predClauseGroup v (complAdjVerb v x) ; ComplV2A v x y = predClauseGroup v (complDitransAdjVerb v x y) ; ----- ComplSubjV2V v x y = predClauseGroup v (complDitransVerbVerb False v x y) ; ----- ComplObjV2V v x y = predClauseGroup v (complDitransVerbVerb True v x y) ; + ComplSubjV2V v x y = predClauseGroup v (complDitransVerbVerb False v x y) ; + ComplObjV2V v x y = predClauseGroup v (complDitransVerbVerb True v x y) ; ComplV2S v x y = predClauseGroup v (complDitransSentVerb v x y) ; ComplV2Q v x y = predClauseGroup v (complDitransQuestVerb v x y) ; PredAP v = predClauseBeGroup (complAdjective v) ; - PredSuperl a = predClauseBeGroup (complAdjective (superlAdjPhrase a)) ; PredCN v = predClauseBeGroup (complCommNoun v) ; PredNP v = predClauseBeGroup (complNounPhrase v) ; PredAdv v = predClauseBeGroup (complAdverb v) ; - PredAV v x = predClauseBeGroup (complVerbAdj v x) ; - PredObjA2V v x y = predClauseBeGroup (complVerbAdj2 True v x y) ; - PredProgVP = progressiveVerbPhrase ; -- Use VPs diff --git a/lib/resource/scandinavian/RulesScand.gf b/lib/resource/scandinavian/RulesScand.gf index 9b89cc0cb..265ef5ac3 100644 --- a/lib/resource/scandinavian/RulesScand.gf +++ b/lib/resource/scandinavian/RulesScand.gf @@ -46,10 +46,12 @@ lin UseA = adj2adjPhrase ; ComplA2 = complAdj ; + ComplAV = complVerbAdj ; + ComplObjA2V = complVerbAdj2 True ; - PositADeg = positAdjPhrase ; + PositADeg = positAdjPhrase ; ComparADeg = comparAdjPhrase ; - SuperlNP = superlNounPhrase ; + SuperlADeg = superlAdjPhrase ; -- verbs and verb phrases mostly in $Clause$ diff --git a/lib/resource/scandinavian/SyntaxScand.gf b/lib/resource/scandinavian/SyntaxScand.gf index 433c38d45..b67d8c488 100644 --- a/lib/resource/scandinavian/SyntaxScand.gf +++ b/lib/resource/scandinavian/SyntaxScand.gf @@ -372,6 +372,12 @@ oper superlSpecies : Species ; + superlAdjPhrase : AdjDegr -> AdjPhrase = \ung -> + {s = \\a,c => ung.s ! AF (Super SupWeak) c ; + p = True + } ; + +{- -- Moreover, superlatives can be used alone as adjectival phrases -- ("yngst", "den yngste" - in free variation). -- N.B. the former is only permitted in predicative position. @@ -383,6 +389,7 @@ oper } ; p = False } ; +-} --3 Two-place adjectives -- @@ -1056,12 +1063,13 @@ oper s2 = hitta.s2 } ; - complVerbAdj : Adjective -> VerbPhrase -> VerbGroup = \grei, simma -> - vara - (\\g,n,p => - grei.s ! predFormAdj g n ! Nom ++ + complVerbAdj : Adjective -> VerbPhrase -> AdjPhrase = \grei, simma -> + {s = \\a,c => + grei.s ! a ! Nom ++ infinAtt ++ - simma.s ! VIInfinit ! g ! n ! p) ; + simma.s ! VIInfinit ! Neutr ! Sg ! P3 ; ---- agreement! + p = False + } ; -- Notice agreement to object vs. subject: @@ -1078,17 +1086,17 @@ oper ) ; complVerbAdj2 : - Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> VerbGroup = + Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> AdjPhrase = \obj,grei,dig,simma -> - vara - (\\g,n,p => - grei.s ! predFormAdj g n ! Nom ++ + {s = \\a,_ => + grei.s ! a ! Nom ++ {-strPrep-} grei.s2 ++ dig.s ! PAcc ++ infinAtt ++ - if_then_Str obj - (simma.s ! VIInfinit ! dig.g ! dig.n ! dig.p) - (simma.s ! VIInfinit ! g ! n ! p) - ) ; + ---- if_then_Str obj + (simma.s ! VIInfinit ! dig.g ! dig.n ! dig.p) ; + ---- (simma.s ! VIInfinit ! g ! n ! p) + p = False + } ; --2 Sentences missing noun phrases -- diff --git a/lib/resource/scandinavian/VerbphraseScand.gf b/lib/resource/scandinavian/VerbphraseScand.gf index 28420fef2..fdbba3c38 100644 --- a/lib/resource/scandinavian/VerbphraseScand.gf +++ b/lib/resource/scandinavian/VerbphraseScand.gf @@ -39,12 +39,9 @@ incomplete concrete VerbphraseScand of Verbphrase = CategoriesScand ** ComplV2Q = complDitransQuestVerb ; PredAP = predAdjective ; - PredSuperl a = predAdjective (superlAdjPhrase a) ; PredCN = predCommNoun ; PredNP = predNounPhrase ; PredAdv = predAdverb ; - PredAV = complVerbAdj ; - PredObjA2V = complVerbAdj2 True ; PredProgVP = progressiveVerbPhrase ; diff --git a/lib/resource/swedish/TimeSwe.gf b/lib/resource/swedish/TimeSwe.gf index 1c66b28b8..daf27ac96 100644 --- a/lib/resource/swedish/TimeSwe.gf +++ b/lib/resource/swedish/TimeSwe.gf @@ -17,8 +17,8 @@ PastTime h m = ss (m.s ++ " ToTime h m = ss (m.s ++ "i" ++ h.s) ; ExactTime h = ss (h.s ++ "prick") ; -NumHour n = n ; -NumMinute n = n ; +NumHour n = {s = n.s ! Neutr} ; +NumMinute n = {s = n.s ! Neutr} ; monday = regN "måndag" utrum ; tuesday = regN "tisdag" utrum ;