forked from GitHub/gf-core
adding Karin's verb constructions
This commit is contained in:
@@ -151,4 +151,8 @@ cat
|
|||||||
|
|
||||||
Phr ; -- full phrase, e.g. "John walks.","Who walks?", "Wait for me!"
|
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."
|
Text ; -- sequence of phrases e.g. "One is odd. Therefore, two is even."
|
||||||
|
|
||||||
|
---- next
|
||||||
|
V3A ; -- paint the house red
|
||||||
|
V3V ; -- ask John to come
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,12 +39,14 @@ oper
|
|||||||
nonhuman : Gender ;
|
nonhuman : Gender ;
|
||||||
|
|
||||||
-- To abstract over number names, we define the following.
|
-- To abstract over number names, we define the following.
|
||||||
|
|
||||||
Number : Type ;
|
Number : Type ;
|
||||||
|
|
||||||
singular : Number ;
|
singular : Number ;
|
||||||
plural : Number ;
|
plural : Number ;
|
||||||
|
|
||||||
-- To abstract over case names, we define the following.
|
-- To abstract over case names, we define the following.
|
||||||
|
|
||||||
Case : Type ;
|
Case : Type ;
|
||||||
|
|
||||||
nominative : Case ;
|
nominative : Case ;
|
||||||
@@ -168,10 +170,6 @@ oper
|
|||||||
mkAdA : Str -> AdA ;
|
mkAdA : Str -> AdA ;
|
||||||
mkAdS : Str -> AdS ;
|
mkAdS : Str -> AdS ;
|
||||||
|
|
||||||
-- Prepositional phrases are another productive form of adverbials.
|
|
||||||
|
|
||||||
mkPP : Prep -> NP -> Adv ;
|
|
||||||
|
|
||||||
--2 Prepositions
|
--2 Prepositions
|
||||||
--
|
--
|
||||||
-- A preposition is just a string.
|
-- A preposition is just a string.
|
||||||
@@ -238,12 +236,12 @@ oper
|
|||||||
nonhuman = NoHum ;
|
nonhuman = NoHum ;
|
||||||
singular = Sg ;
|
singular = Sg ;
|
||||||
plural = Pl ;
|
plural = Pl ;
|
||||||
|
|
||||||
nominative = Nom ;
|
nominative = Nom ;
|
||||||
genitive = Nom ;
|
genitive = Gen ;
|
||||||
|
|
||||||
mkN = \man,men,man's,men's,g ->
|
mkN = \man,men,man's,men's,g ->
|
||||||
mkNoun man men man's men's ** {g = g ; lock_N = <>} ;
|
mkNoun man men man's men's ** {g = g ; lock_N = <>} ;
|
||||||
|
---
|
||||||
nReg a g = addGenN nounReg a g ;
|
nReg a g = addGenN nounReg a g ;
|
||||||
nKiss n g = addGenN nounS n g ;
|
nKiss n g = addGenN nounS n g ;
|
||||||
nFly = \fly -> addGenN nounY (Predef.tk 1 fly) ;
|
nFly = \fly -> addGenN nounY (Predef.tk 1 fly) ;
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ lincat
|
|||||||
V3 = TransVerb ** {s3 : Preposition} ;
|
V3 = TransVerb ** {s3 : Preposition} ;
|
||||||
VS = Verb ;
|
VS = Verb ;
|
||||||
VV = Verb ** {isAux : Bool} ;
|
VV = Verb ** {isAux : Bool} ;
|
||||||
|
V3A = DitransAdjVerb ;
|
||||||
|
V3V = DitransVerbVerb ;
|
||||||
|
|
||||||
|
|
||||||
Adv = Adverb ;
|
Adv = Adverb ;
|
||||||
-- = {s : Str ; isPost : Bool} ;
|
-- = {s : Str ; isPost : Bool} ;
|
||||||
|
|||||||
@@ -279,6 +279,9 @@ oper
|
|||||||
extAdjective : Adj -> Adjective = \adj ->
|
extAdjective : Adj -> Adjective = \adj ->
|
||||||
{s = table {f => table {c => adj.s ! AF (Posit f) c}}} ;
|
{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:
|
-- Coercions between the compound gen-num type and gender and number:
|
||||||
|
|
||||||
gNum : Gender -> Number -> GenNum = \g,n ->
|
gNum : Gender -> Number -> GenNum = \g,n ->
|
||||||
@@ -630,6 +633,19 @@ oper
|
|||||||
ge
|
ge
|
||||||
(\\_,_ => ge.s1 ++ ge.s2 ++ dig.s ! PAcc ++ ge.s3 ++ vin.s ! PAcc) ;
|
(\\_,_ => 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
|
--2 Adverbs
|
||||||
--
|
--
|
||||||
@@ -717,6 +733,8 @@ param
|
|||||||
| ClInfinit Anteriority -- "naked infinitive" clauses
|
| ClInfinit Anteriority -- "naked infinitive" clauses
|
||||||
;
|
;
|
||||||
|
|
||||||
|
ClTense = ClPresent | ClPast | ClFuture | ClPerfect ;
|
||||||
|
|
||||||
oper cl2s : ClForm -> {o : Order ; sf : SForm} = \c -> case c of {
|
oper cl2s : ClForm -> {o : Order ; sf : SForm} = \c -> case c of {
|
||||||
ClIndic t a o => {o = o ; sf = VIndic t a} ;
|
ClIndic t a o => {o = o ; sf = VIndic t a} ;
|
||||||
ClFut a o => {o = o ; sf = VFut 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
|
--3 Sentence-complement verbs
|
||||||
--
|
--
|
||||||
-- Sentence-complement verbs take sentences as complements.
|
-- 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.s ! VInfinit Simul ++ simma.s2 ! True ++ ---- Anter!
|
||||||
simma.s3 ! VInfinit Simul ! g ! n) ;
|
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
|
--2 Sentences missing noun phrases
|
||||||
--
|
--
|
||||||
@@ -939,7 +985,7 @@ oper
|
|||||||
intPronWhat : Number -> IntPron = \num -> {
|
intPronWhat : Number -> IntPron = \num -> {
|
||||||
s = table {
|
s = table {
|
||||||
PGen _ => nonExist ; ---
|
PGen _ => nonExist ; ---
|
||||||
_ => "hvad"
|
_ => pronVad
|
||||||
} ;
|
} ;
|
||||||
n = num ;
|
n = num ;
|
||||||
g = Neutr
|
g = Neutr
|
||||||
|
|||||||
@@ -116,4 +116,9 @@ instance SyntaxSwe of SyntaxScand = TypesSwe **
|
|||||||
mkDeterminerSgGender3 : Str -> Str -> Str -> SpeciesP -> Determiner = \en,_,ett ->
|
mkDeterminerSgGender3 : Str -> Str -> Str -> SpeciesP -> Determiner = \en,_,ett ->
|
||||||
mkDeterminerSgGender (table {Utr => en ; Neutr => 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
|
||||||
|
} ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user