1
0
forked from GitHub/gf-core

heavy NP distinction in Dutch like in German

This commit is contained in:
aarne
2010-05-29 10:19:32 +00:00
parent ebb393d4b1
commit 510e1118a9
5 changed files with 34 additions and 18 deletions

View File

@@ -44,7 +44,7 @@ concrete CatDut of Cat =
-- Noun -- Noun
CN = {s : Adjf => NForm => Str ; g : Gender} ; CN = {s : Adjf => NForm => Str ; g : Gender} ;
NP = {s : NPCase => Str ; a : Agr} ; NP = {s : NPCase => Str ; a : Agr ; isPron : Bool} ;
Pron = Pronoun ; Pron = Pronoun ;
Det = {s,sp : Gender => Str ; n : Number ; a : Adjf} ; Det = {s,sp : Gender => Str ; n : Number ; a : Adjf} ;

View File

@@ -9,9 +9,9 @@ concrete ConjunctionDut of Conjunction =
ConjAdv conj ss = conjunctDistrSS conj ss ; ConjAdv conj ss = conjunctDistrSS conj ss ;
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** { ConjNP conj ss = heavyNP (conjunctDistrTable NPCase conj ss ** {
a = {g = Utr ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} a = {g = Utr ; n = conjNumber conj.n ss.a.n ; p = ss.a.p}
} ; }) ;
ConjAP conj ss = conjunctDistrTable AForm conj ss ** { ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
isPre = ss.isPre isPre = ss.isPre

View File

@@ -19,21 +19,22 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
UsePron pron = { UsePron pron = {
s = table {NPNom => pron.unstressed.nom ; NPAcc => pron.unstressed.acc} ; s = table {NPNom => pron.unstressed.nom ; NPAcc => pron.unstressed.acc} ;
a = pron.a a = pron.a ;
isPron = True
} ; } ;
PredetNP pred np = { PredetNP pred np = heavyNP {
s = \\c => s = \\c =>
pred.s ! np.a.n ! np.a.g ++ np.s ! c ; ---- g pred.s ! np.a.n ! np.a.g ++ np.s ! c ; ---- g
a = np.a a = np.a
} ; } ;
PPartNP np v2 = { PPartNP np v2 = heavyNP {
s = \\c => np.s ! c ++ v2.s ! VPerf ; -- invar part s = \\c => np.s ! c ++ v2.s ! VPerf ; -- invar part
a = np.a a = np.a
} ; } ;
AdvNP np adv = { AdvNP np adv = heavyNP {
s = \\c => np.s ! c ++ adv.s ; s = \\c => np.s ! c ++ adv.s ;
a = np.a a = np.a
} ; } ;

View File

@@ -452,8 +452,9 @@ param
oper VP : Type = { oper VP : Type = {
s : VVerb ; s : VVerb ;
a1 : Polarity => Str ; -- niet a1 : Polarity => Str ; -- niet
n2 : Agr => Str ; -- dich n0 : Agr => Str ; -- je
a2 : Str ; -- heute n2 : Agr => Str ; -- je vrouw
a2 : Str ; -- vandaag
isAux : Bool ; -- is a double infinitive isAux : Bool ; -- is a double infinitive
inf : Str * Bool ; -- sagen (True = non-empty) inf : Str * Bool ; -- sagen (True = non-empty)
ext : Str -- dass sie kommt ext : Str -- dass sie kommt
@@ -465,10 +466,11 @@ param
predVGen : Bool -> VVerb -> VP = \isAux, verb -> { predVGen : Bool -> VVerb -> VP = \isAux, verb -> {
s = verb ; s = verb ;
a1 : Polarity => Str = negation ; a1 : Polarity => Str = negation ;
n2 : Agr => Str = \\a => case verb.vtype of { n0 : Agr => Str = \\a => case verb.vtype of {
VAct => [] ; VAct => [] ;
VRefl => reflPron ! a VRefl => reflPron ! a
} ; } ;
n2 : Agr => Str = \\a => [] ;
a2 : Str = [] ; a2 : Str = [] ;
isAux = isAux ; ---- isAux = isAux ; ----
inf : Str * Bool = <[],False> ; inf : Str * Bool = <[],False> ;
@@ -482,10 +484,13 @@ param
-- Extending a verb phrase with new constituents. -- Extending a verb phrase with new constituents.
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> { insertObj : (Agr => Str) -> VP -> VP = insertObjNP False ;
insertObjNP : Bool -> (Agr => Str) -> VP -> VP = \isPron, obj,vp -> {
s = vp.s ; s = vp.s ;
a1 = vp.a1 ; a1 = vp.a1 ;
n2 = \\a => obj ! a ++ vp.n2 ! a ; n0 = \\a => case isPron of {True => obj ! a ; _ => []} ++ vp.n0 ! a ;
n2 = \\a => case isPron of {False => obj ! a ; _ => []} ++ vp.n2 ! a ;
a2 = vp.a2 ; a2 = vp.a2 ;
isAux = vp.isAux ; isAux = vp.isAux ;
inf = vp.inf ; inf = vp.inf ;
@@ -495,6 +500,7 @@ param
insertAdV : Str -> VP -> VP = \adv,vp -> { insertAdV : Str -> VP -> VP = \adv,vp -> {
s = vp.s ; s = vp.s ;
a1 = \\a => adv ++ vp.a1 ! a ; -- immer nicht a1 = \\a => adv ++ vp.a1 ! a ; -- immer nicht
n0 = vp.n0 ;
n2 = vp.n2 ; n2 = vp.n2 ;
a2 = vp.a2 ; a2 = vp.a2 ;
isAux = vp.isAux ; isAux = vp.isAux ;
@@ -505,6 +511,7 @@ param
insertAdv : Str -> VP -> VP = \adv,vp -> { insertAdv : Str -> VP -> VP = \adv,vp -> {
s = vp.s ; s = vp.s ;
a1 = vp.a1 ; a1 = vp.a1 ;
n0 = vp.n0 ;
n2 = vp.n2 ; n2 = vp.n2 ;
a2 = vp.a2 ++ adv ; a2 = vp.a2 ++ adv ;
isAux = vp.isAux ; isAux = vp.isAux ;
@@ -515,6 +522,7 @@ param
insertExtrapos : Str -> VP -> VP = \ext,vp -> { insertExtrapos : Str -> VP -> VP = \ext,vp -> {
s = vp.s ; s = vp.s ;
a1 = vp.a1 ; a1 = vp.a1 ;
n0 = vp.n0 ;
n2 = vp.n2 ; n2 = vp.n2 ;
a2 = vp.a2 ; a2 = vp.a2 ;
isAux = vp.isAux ; isAux = vp.isAux ;
@@ -525,6 +533,7 @@ param
insertInf : Str -> VP -> VP = \inf,vp -> { insertInf : Str -> VP -> VP = \inf,vp -> {
s = vp.s ; s = vp.s ;
a1 = vp.a1 ; a1 = vp.a1 ;
n0 = vp.n0 ;
n2 = vp.n2 ; n2 = vp.n2 ;
a2 = vp.a2 ; a2 = vp.a2 ;
isAux = vp.isAux ; ---- isAux = vp.isAux ; ----
@@ -556,8 +565,9 @@ param
} ; } ;
fin = verb.p1 ; fin = verb.p1 ;
neg = vp.a1 ! b ; neg = vp.a1 ! b ;
obj0 = vp.n0 ! agr ;
obj = vp.n2 ! agr ; obj = vp.n2 ! agr ;
compl = obj ++ neg ++ vp.a2 ++ vp.s.prefix ; compl = obj0 ++ neg ++ obj ++ 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
@@ -644,11 +654,16 @@ param
s = \\n,g => case <n,g> of {<Sg,Neutr> => dit ; _ => deze} s = \\n,g => case <n,g> of {<Sg,Neutr> => dit ; _ => deze}
} ; } ;
mkNP : Str -> Gender -> Number -> {s : NPCase => Str ; a : Agr} = \s,g,n -> { mkNP : Str -> Gender -> Number -> {s : NPCase => Str ; a : Agr ; isPron : Bool} =
s = \\_ => s ; \s,g,n -> heavyNP {
a = agrgP3 g n ; s = \\_ => s ;
} ; a = agrgP3 g n ;
} ;
auxVV : VVerb -> VVerb ** {isAux : Bool} = \v -> v ** {isAux = True} ; auxVV : VVerb -> VVerb ** {isAux : Bool} = \v -> v ** {isAux = True} ;
heavyNP :
{s : NPCase => Str ; a : Agr} -> {s : NPCase => Str ; a : Agr ; isPron : Bool} = \np ->
np ** {isPron = False} ;
} }

View File

@@ -42,7 +42,7 @@ 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 = insertObj (\\_ => appPrep vp.c2 np.s) vp ; ComplSlash vp np = insertObjNP np.isPron (\\_ => appPrep vp.c2 np.s) vp ;
SlashVV v vp = SlashVV v vp =
let let