diff --git a/lib/resource/abstract/Categories.gf b/lib/resource/abstract/Categories.gf index 13f91fbbe..a2a27f5ef 100644 --- a/lib/resource/abstract/Categories.gf +++ b/lib/resource/abstract/Categories.gf @@ -151,4 +151,8 @@ cat Phr ; -- full phrase, e.g. "John walks.","Who walks?", "Wait for me!" Text ; -- sequence of phrases e.g. "One is odd. Therefore, two is even." + +---- next + V3A ; -- paint the house red + V3V ; -- ask John to come } diff --git a/lib/resource/english/NewParadigmsEng.gf b/lib/resource/english/NewParadigmsEng.gf index c5af6bf62..559dea539 100644 --- a/lib/resource/english/NewParadigmsEng.gf +++ b/lib/resource/english/NewParadigmsEng.gf @@ -39,12 +39,14 @@ oper nonhuman : Gender ; -- To abstract over number names, we define the following. + Number : Type ; singular : Number ; plural : Number ; -- To abstract over case names, we define the following. + Case : Type ; nominative : Case ; @@ -168,10 +170,6 @@ oper mkAdA : Str -> AdA ; mkAdS : Str -> AdS ; --- Prepositional phrases are another productive form of adverbials. - - mkPP : Prep -> NP -> Adv ; - --2 Prepositions -- -- A preposition is just a string. @@ -238,12 +236,12 @@ oper nonhuman = NoHum ; singular = Sg ; plural = Pl ; - nominative = Nom ; - genitive = Nom ; + genitive = Gen ; mkN = \man,men,man's,men's,g -> mkNoun man men man's men's ** {g = g ; lock_N = <>} ; +--- nReg a g = addGenN nounReg a g ; nKiss n g = addGenN nounS n g ; nFly = \fly -> addGenN nounY (Predef.tk 1 fly) ; diff --git a/lib/resource/scandinavian/CategoriesScand.gf b/lib/resource/scandinavian/CategoriesScand.gf index f501d7f2c..cfcb8c6c7 100644 --- a/lib/resource/scandinavian/CategoriesScand.gf +++ b/lib/resource/scandinavian/CategoriesScand.gf @@ -36,6 +36,9 @@ lincat V3 = TransVerb ** {s3 : Preposition} ; VS = Verb ; VV = Verb ** {isAux : Bool} ; + V3A = DitransAdjVerb ; + V3V = DitransVerbVerb ; + Adv = Adverb ; -- = {s : Str ; isPost : Bool} ; diff --git a/lib/resource/scandinavian/SyntaxScand.gf b/lib/resource/scandinavian/SyntaxScand.gf index 182b07fae..ddbdd217a 100644 --- a/lib/resource/scandinavian/SyntaxScand.gf +++ b/lib/resource/scandinavian/SyntaxScand.gf @@ -279,6 +279,9 @@ oper extAdjective : Adj -> Adjective = \adj -> {s = table {f => table {c => adj.s ! AF (Posit f) c}}} ; + adjPastPart : Verb -> Adjective ; + + -- Coercions between the compound gen-num type and gender and number: gNum : Gender -> Number -> GenNum = \g,n -> @@ -630,6 +633,19 @@ oper ge (\\_,_ => ge.s1 ++ ge.s2 ++ dig.s ! PAcc ++ ge.s3 ++ vin.s ! PAcc) ; +-- Adjective-complement ditransitive verbs. + + DitransAdjVerb = TransVerb ; + + mkDitransAdjVerb : Verb -> Preposition -> DitransAdjVerb = \v,p1 -> + v ** {s2 = p1} ; + + complDitransAdjVerb : + DitransVerb -> NounPhrase -> AdjPhrase -> VerbGroup = \gor,dig,sur -> + useVerb + gor + (\\_,_ => gor.s1 ++ gor.s2 ++ dig.s ! PAcc ++ + sur.s ! predFormAdj dig.g dig.n ! Nom) ; --2 Adverbs -- @@ -717,6 +733,8 @@ param | ClInfinit Anteriority -- "naked infinitive" clauses ; + ClTense = ClPresent | ClPast | ClFuture | ClPerfect ; + oper cl2s : ClForm -> {o : Order ; sf : SForm} = \c -> case c of { ClIndic t a o => {o = o ; sf = VIndic t a} ; ClFut a o => {o = o ; sf = VFut a} ; @@ -745,6 +763,16 @@ oper cl2s : ClForm -> {o : Order ; sf : SForm} = \c -> case c of { } ; + clause2sentence : Bool -> ClTense -> Clause -> Sentence = \b,t,cl -> + {s = \\o => cl.s ! b ! case t of { + ClPresent => ClIndic Present Simul o ; + ClPast => ClIndic Past Simul o ; + ClFuture => ClFut Simul o ; + ClPerfect => ClIndic Present Anter o + } + } ; + + --3 Sentence-complement verbs -- -- Sentence-complement verbs take sentences as complements. @@ -771,6 +799,24 @@ oper cl2s : ClForm -> {o : Order ; sf : SForm} = \c -> case c of { simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter! simma.s3 ! VInfinit Simul ! g ! n) ; + transVerbVerb : VerbVerb -> TransVerb -> TransVerb = \vilja,hitta -> + {s = vilja.s ; + s1 = vilja.s1 ++ if_then_Str vilja.isAux [] infinAtt ++ + hitta.s ! VI (Inf Act) ++ hitta.s1 ; ---- Anter! + s2 = hitta.s2 + } ; + +-- Notice agreement to object rather than subject: + + DitransVerbVerb = TransVerb ** {part : Str} ; + + complDitransVerbVerb : + DitransVerbVerb -> NounPhrase -> VerbGroup -> VerbGroup = \be,dig,simma -> + useVerb be + (\\g,n => be.s1 ++ be.s2 ++ dig.s ! PAcc ++ be.part ++ + simma.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter! + simma.s3 ! VInfinit Simul ! dig.g ! dig.n) ; + --2 Sentences missing noun phrases -- @@ -939,7 +985,7 @@ oper intPronWhat : Number -> IntPron = \num -> { s = table { PGen _ => nonExist ; --- - _ => "hvad" + _ => pronVad } ; n = num ; g = Neutr diff --git a/lib/resource/swedish/SyntaxSwe.gf b/lib/resource/swedish/SyntaxSwe.gf index ed63dc4f3..ce2193ef5 100644 --- a/lib/resource/swedish/SyntaxSwe.gf +++ b/lib/resource/swedish/SyntaxSwe.gf @@ -116,4 +116,9 @@ instance SyntaxSwe of SyntaxScand = TypesSwe ** mkDeterminerSgGender3 : Str -> Str -> Str -> SpeciesP -> Determiner = \en,_,ett -> mkDeterminerSgGender (table {Utr => en ; Neutr => ett}) ; +-- next + + adjPastPart : Verb -> Adjective = \verb -> { + s = \\af,c => verb.s1 ++ verb.s ! VI (PtPret af c) --- på slagen + } ; }