mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 00:52:51 -06:00
Major changes in Dutch: word order fixes, add particle verbs, fixes in verb smart paradigms
This commit is contained in:
@@ -34,7 +34,7 @@ concrete CatDut of Cat =
|
|||||||
-- Verb
|
-- Verb
|
||||||
|
|
||||||
VP = ResDut.VP ;
|
VP = ResDut.VP ;
|
||||||
VPSlash = ResDut.VP ** {c2 : Preposition} ;
|
VPSlash = ResDut.VP ** {c2 : Preposition * Bool} ;
|
||||||
Comp = {s : Agr => Str} ;
|
Comp = {s : Agr => Str} ;
|
||||||
|
|
||||||
-- Adjective
|
-- Adjective
|
||||||
@@ -73,9 +73,10 @@ concrete CatDut of Cat =
|
|||||||
|
|
||||||
V, VS, VQ, VA = ResDut.VVerb ;
|
V, VS, VQ, VA = ResDut.VVerb ;
|
||||||
VV = VVerb ** {isAux : Bool} ;
|
VV = VVerb ** {isAux : Bool} ;
|
||||||
V2, V2A, V2S, V2Q = VVerb ** {c2 : Preposition} ;
|
V2, V2A, V2S, V2Q = VVerb ** {c2 : Preposition * Bool} ;
|
||||||
V2V = VVerb ** {c2 : Preposition ; isAux : Bool} ;
|
V2V = VVerb ** {c2 : Preposition * Bool ; isAux : Bool} ;
|
||||||
V3 = VVerb ** {c2, c3 : Preposition} ;
|
V3 = VVerb ** {c2, c3 : Preposition * Bool} ;
|
||||||
|
-- Preposition * Bool: True if there is a preposition (info needed for word order)
|
||||||
|
|
||||||
A = Adjective ;
|
A = Adjective ;
|
||||||
A2 = Adjective ** {c2 : Preposition} ;
|
A2 = Adjective ** {c2 : Preposition} ;
|
||||||
|
|||||||
@@ -121,7 +121,8 @@ lin
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
NominalizeVPSlashNP vpslash np =
|
NominalizeVPSlashNP vpslash np =
|
||||||
let vp : ResDut.VP = insertObjNP np.isPron (\\_ => appPrep vpslash.c2 np.s) vpslash ;
|
--False for negation place; doesn't matter because vp.a1 ! Pos is chosen
|
||||||
|
let vp : ResDut.VP = insertObjNP np.isPron False (\\_ => appPrep vpslash.c2.p1 np.s) vpslash ;
|
||||||
agrDef : Agr = agrP3 Sg ;
|
agrDef : Agr = agrP3 Sg ;
|
||||||
compl : Str = vp.n0 ! agrDef ++ vp.a1 ! Pos ++ vp.n2 ! agrDef ++ vp.s.prefix ;
|
compl : Str = vp.n0 ! agrDef ++ vp.a1 ! Pos ++ vp.n2 ! agrDef ++ vp.s.prefix ;
|
||||||
inf : Str = vp.inf.p1 ;
|
inf : Str = vp.inf.p1 ;
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ leather_N = mkN "leer" neuter ;
|
|||||||
leave_V2 = mkV2 (mkV "verlaten" "verliet" "verlieten" "verlaten") ;
|
leave_V2 = mkV2 (mkV "verlaten" "verliet" "verlieten" "verlaten") ;
|
||||||
leg_N = mkN "been" neuter ;
|
leg_N = mkN "been" neuter ;
|
||||||
lie_V = liggen_V ;
|
lie_V = liggen_V ;
|
||||||
like_V2 = mkV2 houden_V van_Prep ;
|
like_V2 = mkV2 (partV (mkV "vinden") "leuk") ;
|
||||||
listen_V2 = mkV2 "luisteren" ;
|
listen_V2 = mkV2 "luisteren" ;
|
||||||
live_V = mkV "leven" ;
|
live_V = mkV "leven" ;
|
||||||
liver_N = mkN "lever" utrum ;
|
liver_N = mkN "lever" utrum ;
|
||||||
@@ -208,7 +208,7 @@ long_A = mkA "lang" ;
|
|||||||
lose_V2 = mkV2 verliezen_V ;
|
lose_V2 = mkV2 verliezen_V ;
|
||||||
louse_N = mkN "luis" utrum ;
|
louse_N = mkN "luis" utrum ;
|
||||||
love_N = mkN "liefde" utrum ;
|
love_N = mkN "liefde" utrum ;
|
||||||
love_V2 = mkV2 (mkV "lief" hebben_V) ;
|
love_V2 = mkV2 houden_V van_Prep ;
|
||||||
man_N = mkN "man" utrum ;
|
man_N = mkN "man" utrum ;
|
||||||
meat_N = mkN "vlees" neuter ;
|
meat_N = mkN "vlees" neuter ;
|
||||||
milk_N = mkN "melk" utrum ;
|
milk_N = mkN "melk" utrum ;
|
||||||
|
|||||||
@@ -267,14 +267,17 @@ oper
|
|||||||
mkV : V -> Str -> V = \s,v ->lin V (prefixV v s) ; ---- the same, in order matching Wiktionary-generated lexicon
|
mkV : V -> Str -> V = \s,v ->lin V (prefixV v s) ; ---- the same, in order matching Wiktionary-generated lexicon
|
||||||
} ;
|
} ;
|
||||||
zijnV v = lin V (v2vvAux v VZijn) ;
|
zijnV v = lin V (v2vvAux v VZijn) ;
|
||||||
reflV v = lin V {s = v.s ; aux = v.aux ; prefix = v.prefix ; vtype = VRefl} ;
|
reflV v = lin V {s = v.s ; aux = v.aux ; particle = v.particle ; prefix = v.prefix ; vtype = VRefl} ;
|
||||||
|
|
||||||
|
partV : V -> Str -> V = \vinden,leuk ->
|
||||||
|
vinden ** {particle = leuk} ;
|
||||||
|
|
||||||
no_geV v = let vs = v.s in {
|
no_geV v = let vs = v.s in {
|
||||||
s = table {
|
s = table {
|
||||||
VPerf => Predef.drop 2 (vs ! VPerf) ;
|
VPerf => Predef.drop 2 (vs ! VPerf) ;
|
||||||
p => vs ! p
|
p => vs ! p
|
||||||
} ;
|
} ;
|
||||||
prefix = v.prefix ; lock_V = v.lock_V ; aux = v.aux ; vtype = v.vtype
|
prefix = v.prefix ; lock_V = v.lock_V ; particle = v.particle ; aux = v.aux ; vtype = v.vtype
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
fixprefixV s v = let vs = v.s in {
|
fixprefixV s v = let vs = v.s in {
|
||||||
@@ -282,16 +285,16 @@ oper
|
|||||||
VPerf => s + Predef.drop 2 (vs ! VPerf) ;
|
VPerf => s + Predef.drop 2 (vs ! VPerf) ;
|
||||||
p => s + vs ! p
|
p => s + vs ! p
|
||||||
} ;
|
} ;
|
||||||
prefix = v.prefix ; lock_V = v.lock_V ; aux = v.aux ; vtype = v.vtype
|
prefix = v.prefix ; lock_V = v.lock_V ; aux = v.aux ; particle = v.particle ; vtype = v.vtype
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
zijn_V : V = lin V ResDut.zijn_V ;
|
zijn_V : V = lin V ResDut.zijn_V ;
|
||||||
hebben_V : V = lin V ResDut.hebben_V ;
|
hebben_V : V = lin V ResDut.hebben_V ;
|
||||||
|
|
||||||
mkV2 = overload {
|
mkV2 = overload {
|
||||||
mkV2 : Str -> V2 = \s -> lin V2 (v2vv (regVerb s) ** {c2 = []}) ;
|
mkV2 : Str -> V2 = \s -> lin V2 (v2vv (regVerb s) ** {c2 = <[],False>}) ;
|
||||||
mkV2 : V -> V2 = \s -> lin V2 (s ** {c2 = []}) ;
|
mkV2 : V -> V2 = \s -> lin V2 (s ** {c2 = <[],False>}) ;
|
||||||
mkV2 : V -> Prep -> V2 = \s,p -> lin V2 (s ** {c2 = p.s}) ;
|
mkV2 : V -> Prep -> V2 = \s,p -> lin V2 (s ** {c2 = <p.s,True>}) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
@@ -307,7 +310,7 @@ oper
|
|||||||
mkV3 : V -> Prep -> V3 = \v,p -> mkmaxV3 v (mkPrep []) p ;
|
mkV3 : V -> Prep -> V3 = \v,p -> mkmaxV3 v (mkPrep []) p ;
|
||||||
mkV3 : V -> V3 = \v -> mkmaxV3 v (mkPrep []) (mkPrep []) ;
|
mkV3 : V -> V3 = \v -> mkmaxV3 v (mkPrep []) (mkPrep []) ;
|
||||||
} ;
|
} ;
|
||||||
mkmaxV3 : V -> Prep -> Prep -> V3 = \v,c,d -> lin V3 (v ** {c2 = c.s ; c3 = d.s}) ;
|
mkmaxV3 : V -> Prep -> Prep -> V3 = \v,c,d -> lin V3 (v ** {c2 = <c.s,True> ; c3 = <d.s,True>}) ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -473,7 +476,7 @@ oper
|
|||||||
-- werden_V = MorphoDut.werden_V ** {lock_V = <>} ;
|
-- werden_V = MorphoDut.werden_V ** {lock_V = <>} ;
|
||||||
--
|
--
|
||||||
prepV2 : V -> Prep -> V2 ;
|
prepV2 : V -> Prep -> V2 ;
|
||||||
prepV2 v c = lin V2 (v ** {c2 = c.s}) ;
|
prepV2 v c = lin V2 (v ** {c2 = <c.s,True>}) ; --if it has prep, needed for word order (place of negation)
|
||||||
-- dirV2 v = prepV2 v (mkPrep [] accusative) ;
|
-- dirV2 v = prepV2 v (mkPrep [] accusative) ;
|
||||||
-- datV2 v = prepV2 v (mkPrep [] dative) ;
|
-- datV2 v = prepV2 v (mkPrep [] dative) ;
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
--
|
--
|
||||||
-- (c) 2009 Femke Johansson and Aarne Ranta
|
-- (c) 2009 Femke Johansson and Aarne Ranta
|
||||||
|
|
||||||
resource ResDut = ParamX ** open Prelude in {
|
resource ResDut = ParamX ** open Prelude, Predef in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
|
||||||
@@ -163,6 +163,7 @@ resource ResDut = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
prefix = ein ;
|
prefix = ein ;
|
||||||
aux = verb.aux ;
|
aux = verb.aux ;
|
||||||
|
particle = verb.particle ;
|
||||||
vtype = verb.vtype
|
vtype = verb.vtype
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -180,43 +181,36 @@ resource ResDut = ParamX ** open Prelude in {
|
|||||||
_ => d_regVerb verb stem
|
_ => d_regVerb verb stem
|
||||||
|
|
||||||
};
|
};
|
||||||
|
consonant : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z") ;
|
||||||
|
vowel : pattern Str = #("a"|"e"|"i"|"o"|"u") ;
|
||||||
-- To make a stem out of a verb
|
-- To make a stem out of a verb
|
||||||
-- If a stem ends in a 'v' then the 'v' changes into a 'f'
|
-- If a stem ends in a 'v' then the 'v' changes into a 'f'
|
||||||
-- If a stem ends in a 'z' then the 'z' changes into an 's'
|
-- If a stem ends in a 'z' then the 'z' changes into an 's'
|
||||||
-- If a stem ends on a double consonant then one of them disappears
|
-- If a stem ends on a double consonant then one of them disappears
|
||||||
-- If a stem ends on a consonant but that consonant has exactly 1 vowel before it
|
-- If a stem ends on a consonant but that consonant has exactly 1 vowel before it
|
||||||
-- then we have to double this vowel
|
-- then we have to double this vowel
|
||||||
mkStem : Str -> Str =\werken ->
|
mkStem : Str -> Str =\lopen ->
|
||||||
let stem = Predef.tk 2 werken
|
let
|
||||||
|
lop = tk 2 lopen ; --drop the -en
|
||||||
|
lo = init lop ;
|
||||||
|
o = last lo ;
|
||||||
|
p = case last lop of {
|
||||||
|
"v" => "f" ;
|
||||||
|
"z" => "s" ;
|
||||||
|
p => p
|
||||||
|
} ;
|
||||||
|
loop = lo + o + p ; -- voiced consonant to unvoiced, vowel doubling
|
||||||
|
kerf = lo + p ; -- voiced consonant to unvoiced, no vowel doubling
|
||||||
|
zeg = tk 3 lopen ; -- double consonant disappearing
|
||||||
|
werk = lop -- no changes to stem
|
||||||
|
|
||||||
in
|
in
|
||||||
case stem of {
|
case lop of {
|
||||||
-- Vowel doubling for verbs whose stem does not end on 'v' or 'z'
|
_+ #consonant + #vowel + #consonant => loop ;
|
||||||
_+ ("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z")
|
|
||||||
+ ("a"|"e"|"i"|"o"|"u")
|
|
||||||
+ ("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"w"|"x"|"y")
|
|
||||||
=> Predef.tk 2 stem + (Predef.tk 1 (Predef.dp 2 stem)) + Predef.dp 2 stem;
|
|
||||||
|
|
||||||
-- Vowel doubling for verbs whose stem end on 'v'
|
|
||||||
_+ ("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z")
|
|
||||||
+ ("a"|"e"|"i"|"o"|"u")
|
|
||||||
+ "v" => Predef.tk 2 stem + (Predef.tk 1 (Predef.dp 2 stem)) +
|
|
||||||
(Predef.tk 1 (Predef.dp 2 stem)) +"f";
|
|
||||||
|
|
||||||
-- Vowel doubling for verbs whose stem end on 'z`'
|
|
||||||
_+ ("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z")
|
|
||||||
+ ("a"|"e"|"i"|"o"|"u")
|
|
||||||
+ "z" => Predef.tk 2 stem + (Predef.tk 1 (Predef.dp 2 stem)) +
|
|
||||||
(Predef.tk 1 (Predef.dp 2 stem)) + "s";
|
|
||||||
|
|
||||||
_+ "v" => (Predef.tk 1 stem) + "f";
|
|
||||||
_+ "z" => (Predef.tk 1 stem) + "s";
|
|
||||||
|
|
||||||
_+ ("bb" | "dd" | "ff" | "gg" | "kk" | "ll" | "mm" | "nn" | "pp" |
|
_+ ("bb" | "dd" | "ff" | "gg" | "kk" | "ll" | "mm" | "nn" | "pp" |
|
||||||
"rr" | "ss" | "tt") => Predef.tk 1 stem;
|
"rr" | "ss" | "tt") => zeg ;
|
||||||
|
_+ #consonant + ("v"|"z") => kerf ;
|
||||||
|
_ => werk --default case, #consonant + #consonant
|
||||||
_ => stem
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -297,6 +291,7 @@ resource ResDut = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
aux = VZijn ;
|
aux = VZijn ;
|
||||||
prefix = [] ;
|
prefix = [] ;
|
||||||
|
particle = [] ;
|
||||||
vtype = VAct ;
|
vtype = VAct ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -318,6 +313,7 @@ resource ResDut = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
aux = VHebben ;
|
aux = VHebben ;
|
||||||
prefix = [] ;
|
prefix = [] ;
|
||||||
|
particle = [] ;
|
||||||
vtype = VAct ;
|
vtype = VAct ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -339,6 +335,7 @@ resource ResDut = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
aux = VHebben ;
|
aux = VHebben ;
|
||||||
prefix = [] ;
|
prefix = [] ;
|
||||||
|
particle = [] ;
|
||||||
vtype = VAct ;
|
vtype = VAct ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -360,11 +357,12 @@ resource ResDut = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
aux = VHebben ;
|
aux = VHebben ;
|
||||||
prefix = [] ;
|
prefix = [] ;
|
||||||
|
particle = [] ;
|
||||||
vtype = VAct ;
|
vtype = VAct ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
worden_V = irregVerb2 "worden" "werd" "werden" "geworden" ** {
|
worden_V = irregVerb2 "worden" "werd" "werden" "geworden" ** {
|
||||||
aux = VZijn ; prefix = [] ; vtype = VAct} ;
|
aux = VZijn ; prefix = [] ; particle = [] ; vtype = VAct} ;
|
||||||
|
|
||||||
Pronoun : Type = {
|
Pronoun : Type = {
|
||||||
unstressed,stressed : {nom, acc, poss : Str} ;
|
unstressed,stressed : {nom, acc, poss : Str} ;
|
||||||
@@ -389,14 +387,18 @@ param
|
|||||||
Adjf = Strong | Weak ;
|
Adjf = Strong | Weak ;
|
||||||
|
|
||||||
|
|
||||||
oper VVerb = Verb ** {prefix : Str ; aux : VAux ; vtype : VType} ;
|
oper VVerb = Verb ** {prefix : Str ; -- af + stappen
|
||||||
|
particle : Str ; -- non-inflecting component, e.g. leuk vinden
|
||||||
|
aux : VAux ; -- hebben or zijn
|
||||||
|
vtype : VType} ; -- active or reflexive
|
||||||
|
|
||||||
param VAux = VHebben | VZijn ;
|
param VAux = VHebben | VZijn ;
|
||||||
|
|
||||||
param VType = VAct | VRefl ;
|
param VType = VAct | VRefl ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
v2vvAux : Verb -> VAux -> VVerb = \v,a ->
|
v2vvAux : Verb -> VAux -> VVerb = \v,a ->
|
||||||
{s = v.s ; aux = a ; prefix = [] ; vtype = VAct} ;
|
{s = v.s ; aux = a ; prefix = [] ; particle = [] ; vtype = VAct} ;
|
||||||
v2vv : Verb -> VVerb = \v -> v2vvAux v VHebben ;
|
v2vv : Verb -> VVerb = \v -> v2vvAux v VHebben ;
|
||||||
|
|
||||||
|
|
||||||
@@ -405,7 +407,7 @@ param
|
|||||||
---- clause, inverted, or subordinate.
|
---- clause, inverted, or subordinate.
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Preposition = Str ;
|
Preposition = Str ; --* Bool;
|
||||||
appPrep : Preposition -> (NPCase => Str) -> Str = \p,np -> p ++ np ! NPAcc ; ----
|
appPrep : Preposition -> (NPCase => Str) -> Str = \p,np -> p ++ np ! NPAcc ; ----
|
||||||
|
|
||||||
param
|
param
|
||||||
@@ -470,8 +472,9 @@ param
|
|||||||
n2 : Agr => Str ; -- je vrouw
|
n2 : Agr => Str ; -- je vrouw
|
||||||
a2 : Str ; -- vandaag
|
a2 : Str ; -- vandaag
|
||||||
isAux : Bool ; -- is a double infinitive
|
isAux : Bool ; -- is a double infinitive
|
||||||
inf : Str * Bool ; -- sagen (True = non-empty)
|
negBeforeObj : Bool ; -- ik schoop X niet ; ik houd niet van X ; dat is niet leuk
|
||||||
ext : Str -- dass sie kommt
|
inf : Str * Bool ; -- zeggen (True = non-empty)
|
||||||
|
ext : Str -- dat je komt
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
predV : VVerb -> VP = predVGen False ;
|
predV : VVerb -> VP = predVGen False ;
|
||||||
@@ -487,6 +490,7 @@ param
|
|||||||
n2 : Agr => Str = \\a => [] ;
|
n2 : Agr => Str = \\a => [] ;
|
||||||
a2 : Str = [] ;
|
a2 : Str = [] ;
|
||||||
isAux = isAux ; ----
|
isAux = isAux ; ----
|
||||||
|
negBeforeObj = False ;
|
||||||
inf : Str * Bool = <[],False> ;
|
inf : Str * Bool = <[],False> ;
|
||||||
ext : Str = []
|
ext : Str = []
|
||||||
} ;
|
} ;
|
||||||
@@ -498,15 +502,18 @@ param
|
|||||||
|
|
||||||
-- Extending a verb phrase with new constituents.
|
-- Extending a verb phrase with new constituents.
|
||||||
|
|
||||||
insertObj : (Agr => Str) -> VP -> VP = insertObjNP False ;
|
--when we call it with a normal VP, just copy the negBeforeObj field of the vp
|
||||||
|
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> insertObjNP False vp.negBeforeObj obj vp;
|
||||||
|
|
||||||
insertObjNP : Bool -> (Agr => Str) -> VP -> VP = \isPron, obj,vp -> {
|
--this is needed when we call insertObjNP in ComplSlash: VPSlash is a subtype of VP so it works
|
||||||
|
insertObjNP : Bool -> Bool -> (Agr => Str) -> VP -> VP = \isPron,negBeforeObj,obj,vp -> {
|
||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
a1 = vp.a1 ;
|
a1 = vp.a1 ;
|
||||||
n0 = \\a => case isPron of {True => obj ! a ; _ => []} ++ vp.n0 ! a ;
|
n0 = \\a => case isPron of {True => obj ! a ; _ => []} ++ vp.n0 ! a ;
|
||||||
n2 = \\a => case isPron of {False => obj ! a ; _ => []} ++ vp.n2 ! a ;
|
n2 = \\a => case isPron of {False => obj ! a ; _ => []} ++ vp.n2 ! a ;
|
||||||
a2 = vp.a2 ;
|
a2 = vp.a2 ;
|
||||||
isAux = vp.isAux ;
|
isAux = vp.isAux ;
|
||||||
|
negBeforeObj = negBeforeObj ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
ext = vp.ext
|
ext = vp.ext
|
||||||
} ;
|
} ;
|
||||||
@@ -518,6 +525,7 @@ param
|
|||||||
n2 = vp.n2 ;
|
n2 = vp.n2 ;
|
||||||
a2 = vp.a2 ;
|
a2 = vp.a2 ;
|
||||||
isAux = vp.isAux ;
|
isAux = vp.isAux ;
|
||||||
|
negBeforeObj = vp.negBeforeObj ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
ext = vp.ext
|
ext = vp.ext
|
||||||
} ;
|
} ;
|
||||||
@@ -529,6 +537,8 @@ param
|
|||||||
n2 = vp.n2 ;
|
n2 = vp.n2 ;
|
||||||
a2 = vp.a2 ++ adv ;
|
a2 = vp.a2 ++ adv ;
|
||||||
isAux = vp.isAux ;
|
isAux = vp.isAux ;
|
||||||
|
-- hasPrep = vp.hasPrep ;
|
||||||
|
negBeforeObj = vp.negBeforeObj ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
ext = vp.ext
|
ext = vp.ext
|
||||||
} ;
|
} ;
|
||||||
@@ -540,6 +550,8 @@ param
|
|||||||
n2 = vp.n2 ;
|
n2 = vp.n2 ;
|
||||||
a2 = vp.a2 ;
|
a2 = vp.a2 ;
|
||||||
isAux = vp.isAux ;
|
isAux = vp.isAux ;
|
||||||
|
-- hasPrep = vp.hasPrep ;
|
||||||
|
negBeforeObj = vp.negBeforeObj ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
ext = vp.ext ++ ext
|
ext = vp.ext ++ ext
|
||||||
} ;
|
} ;
|
||||||
@@ -551,6 +563,8 @@ param
|
|||||||
n2 = vp.n2 ;
|
n2 = vp.n2 ;
|
||||||
a2 = vp.a2 ;
|
a2 = vp.a2 ;
|
||||||
isAux = vp.isAux ; ----
|
isAux = vp.isAux ; ----
|
||||||
|
negBeforeObj = vp.negBeforeObj ;
|
||||||
|
-- hasPrep = vp.hasPrep ;
|
||||||
inf = <inf ++ vp.inf.p1, True> ;
|
inf = <inf ++ vp.inf.p1, True> ;
|
||||||
ext = vp.ext
|
ext = vp.ext
|
||||||
} ;
|
} ;
|
||||||
@@ -581,7 +595,11 @@ param
|
|||||||
neg = vp.a1 ! b ;
|
neg = vp.a1 ! b ;
|
||||||
obj0 = vp.n0 ! agr ;
|
obj0 = vp.n0 ! agr ;
|
||||||
obj = vp.n2 ! agr ;
|
obj = vp.n2 ! agr ;
|
||||||
compl = obj0 ++ neg ++ obj ++ vp.a2 ++ vp.s.prefix ;
|
part = vp.s.particle ;
|
||||||
|
compl = case vp.negBeforeObj of {
|
||||||
|
True => neg ++ obj0 ++ obj ++ part ++ vp.a2 ++ vp.s.prefix ;
|
||||||
|
_ => obj0 ++ obj ++ neg ++ part ++ vp.a2 ++ vp.s.prefix
|
||||||
|
} ;
|
||||||
inf =
|
inf =
|
||||||
case <vp.isAux, vp.inf.p2, a> of { --# notpresent
|
case <vp.isAux, vp.inf.p2, a> of { --# notpresent
|
||||||
<True,True,Anter> => vp.s.s ! VInf ++ vp.inf.p1 ; --# notpresent
|
<True,True,Anter> => vp.s.s ! VInf ++ vp.inf.p1 ; --# notpresent
|
||||||
@@ -604,7 +622,7 @@ param
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
auxVerb : VAux -> VVerb = \a -> case a of {
|
auxVerb : VAux -> Verb = \a -> case a of {
|
||||||
VHebben => hebben_V ;
|
VHebben => hebben_V ;
|
||||||
VZijn => zijn_V
|
VZijn => zijn_V
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -20,15 +20,19 @@ concrete SentenceDut of Sentence = CatDut ** open ResDut, Prelude in {
|
|||||||
verb = vp.s.s ! ps.p1 ;
|
verb = vp.s.s ! ps.p1 ;
|
||||||
inf = vp.inf.p1 ;
|
inf = vp.inf.p1 ;
|
||||||
in
|
in
|
||||||
verb ++ ps.p2 ++
|
case vp.negBeforeObj of {
|
||||||
vp.a1 ! pol ++ vp.n0 ! agr ++ vp.n2 ! agr ++ vp.a2 ++ inf ++ vp.ext
|
True => verb ++ ps.p2 ++ vp.a1 ! pol ++ vp.n0 ! agr ++
|
||||||
|
vp.n2 ! agr ++ vp.a2 ++ inf ++ vp.ext ;
|
||||||
|
_ => verb ++ ps.p2 ++ vp.n0 ! agr ++ vp.n2 ! agr ++
|
||||||
|
vp.a1 ! pol ++ vp.a2 ++ inf ++ vp.ext
|
||||||
|
} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashVP np vp =
|
SlashVP np vp =
|
||||||
mkClause
|
mkClause
|
||||||
(np.s ! NPNom) np.a
|
(np.s ! NPNom) np.a
|
||||||
vp **
|
vp **
|
||||||
{c2 = vp.c2} ;
|
{c2 = vp.c2.p1} ; --ClSlash has just Preposition, not Prep * Bool
|
||||||
|
|
||||||
AdvSlash slash adv = {
|
AdvSlash slash adv = {
|
||||||
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
|
|||||||
SlashV2a v = predV (v2v v) ** {c2 = v.c2} ;
|
SlashV2a v = predV (v2v v) ** {c2 = v.c2} ;
|
||||||
|
|
||||||
Slash2V3 v np =
|
Slash2V3 v np =
|
||||||
insertObj (\\_ => appPrep v.c2 np.s) (predVv v) ** {c2 = v.c3} ;
|
insertObj (\\_ => appPrep v.c2.p1 np.s) (predVv v) ** {c2 = v.c3} ;
|
||||||
Slash3V3 v np =
|
Slash3V3 v np =
|
||||||
insertObj (\\_ => appPrep v.c3 np.s) (predVv v) ** {c2 = v.c2} ;
|
insertObj (\\_ => appPrep v.c3.p1 np.s) (predVv v) ** {c2 = v.c2} ;
|
||||||
|
|
||||||
SlashV2S v s =
|
SlashV2S v s =
|
||||||
insertExtrapos (conjThat ++ s.s ! Sub) (predVv v) ** {c2 = v.c2} ;
|
insertExtrapos (conjThat ++ s.s ! Sub) (predVv v) ** {c2 = v.c2} ;
|
||||||
@@ -42,7 +42,8 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
|
|||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertObj (\\_ => ap.s ! APred) (predVv v) ** {c2 = v.c2} ;
|
insertObj (\\_ => ap.s ! APred) (predVv v) ** {c2 = v.c2} ;
|
||||||
|
|
||||||
ComplSlash vp np = insertObjNP np.isPron (\\_ => appPrep vp.c2 np.s) vp ;
|
--vp.c2.p2: if the verb has a preposition or not
|
||||||
|
ComplSlash vp np = insertObjNP np.isPron vp.c2.p2 (\\_ => appPrep vp.c2.p1 np.s) vp ;
|
||||||
|
|
||||||
SlashVV v vp =
|
SlashVV v vp =
|
||||||
let
|
let
|
||||||
@@ -60,10 +61,12 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
|
|||||||
insertExtrapos vpi.p3 (
|
insertExtrapos vpi.p3 (
|
||||||
insertInf vpi.p2 (
|
insertInf vpi.p2 (
|
||||||
insertObj vpi.p1 (
|
insertObj vpi.p1 (
|
||||||
insertObj (\\_ => appPrep v.c2 np.s) (
|
insertObj (\\_ => appPrep v.c2.p1 np.s) (
|
||||||
predVv v)))) ** {c2 = v.c2} ;
|
predVv v)))) ** {c2 = v.c2} ;
|
||||||
|
|
||||||
UseComp comp = insertObj comp.s (predV zijn_V) ; -- agr not used
|
-- True, because negation comes before copula complement
|
||||||
|
-- "ik ben niet groot" but "ik begrijp hem niet"
|
||||||
|
UseComp comp = insertObjNP False True comp.s (predV zijn_V) ; -- agr not used
|
||||||
|
|
||||||
UseCopula = predV zijn_V ;
|
UseCopula = predV zijn_V ;
|
||||||
|
|
||||||
@@ -75,16 +78,16 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
|
|||||||
AdvVP vp adv = insertAdv adv.s vp ;
|
AdvVP vp adv = insertAdv adv.s vp ;
|
||||||
AdVVP adv vp = insertAdV adv.s vp ;
|
AdVVP adv vp = insertAdV adv.s vp ;
|
||||||
|
|
||||||
ReflVP vp = insertObj (\\a => appPrep vp.c2 (\\_ => reflPron ! a)) vp ;
|
ReflVP vp = insertObj (\\a => appPrep vp.c2.p1 (\\_ => reflPron ! a)) vp ;
|
||||||
|
|
||||||
PassV2 v = insertInf (v.s ! VPerf) (predV worden_V) ;
|
PassV2 v = insertInf (v.s ! VPerf) (predV worden_V) ;
|
||||||
|
|
||||||
VPSlashPrep vp prep = vp ** {c2 = prep.s} ;
|
VPSlashPrep vp prep = vp ** {c2 = <prep.s,True>} ;
|
||||||
|
|
||||||
---- workaround for a subtyping bug
|
---- workaround for a subtyping bug
|
||||||
oper
|
oper
|
||||||
v2v : VVerb -> VVerb = \v ->
|
v2v : VVerb -> VVerb = \v ->
|
||||||
{s = v.s ; aux = v.aux ; prefix = v.prefix ; vtype = v.vtype} ;
|
{s = v.s ; aux = v.aux ; prefix = v.prefix ; particle = v.particle ; vtype = v.vtype} ;
|
||||||
predVv : VVerb -> ResDut.VP = \v -> predV (v2v v) ;
|
predVv : VVerb -> ResDut.VP = \v -> predV (v2v v) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user