forked from GitHub/gf-rgl
German compund verbs glued in morphology
This commit is contained in:
@@ -355,7 +355,30 @@ oper
|
|||||||
mkV singen singt sing sang saenge gesungen ;
|
mkV singen singt sing sang saenge gesungen ;
|
||||||
|
|
||||||
prefixV p v =
|
prefixV p v =
|
||||||
{s = v.s ; prefix = p ; lock_V = v.lock_V ; aux = v.aux ; vtype = v.vtype} ;
|
let
|
||||||
|
vs = v.s ;
|
||||||
|
v1 = MorphoGer.mkV
|
||||||
|
(vs ! (VInf False))
|
||||||
|
(vs ! (VFin False (VPresInd Sg P1)))
|
||||||
|
(vs ! (VFin False (VPresInd Sg P2)))
|
||||||
|
(vs ! (VFin False (VPresInd Sg P3)))
|
||||||
|
(vs ! (VFin False (VPresInd Pl P2)))
|
||||||
|
(vs ! VImper Sg)
|
||||||
|
(vs ! (VFin False (VImpfInd Sg P1)))
|
||||||
|
(vs ! (VFin False (VImpfInd Sg P2)))
|
||||||
|
(vs ! (VFin False (VImpfInd Pl P1)))
|
||||||
|
(vs ! (VFin False (VImpfInd Pl P2)))
|
||||||
|
(vs ! (VFin False (VImpfSubj Sg P2)))
|
||||||
|
(vs ! VPastPart APred)
|
||||||
|
p
|
||||||
|
v.aux
|
||||||
|
in {
|
||||||
|
s = v1.s ;
|
||||||
|
prefix = p ;
|
||||||
|
lock_V = v.lock_V ;
|
||||||
|
aux = v.aux ;
|
||||||
|
vtype = v.vtype
|
||||||
|
} ;
|
||||||
habenV v =
|
habenV v =
|
||||||
{s = v.s ; prefix = v.prefix ; lock_V = v.lock_V ; aux = VHaben ; vtype = v.vtype} ;
|
{s = v.s ; prefix = v.prefix ; lock_V = v.lock_V ; aux = VHaben ; vtype = v.vtype} ;
|
||||||
seinV v =
|
seinV v =
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ concrete PhraseGer of Phrase = CatGer ** open Prelude, ResGer in {
|
|||||||
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
UttNP np = {s = np.s ! Acc} ;
|
UttNP np = {s = np.s ! Acc} ;
|
||||||
UttVP vp = {s = useInfVP False vp} ;
|
UttVP vp = {s = useInfVP True vp} ; -- without zu
|
||||||
UttAdv adv = adv ;
|
UttAdv adv = adv ;
|
||||||
|
|
||||||
NoPConj = {s = []} ;
|
NoPConj = {s = []} ;
|
||||||
|
|||||||
@@ -48,14 +48,18 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
--2 For $Verb$
|
--2 For $Verb$
|
||||||
|
|
||||||
param VForm =
|
param VForm =
|
||||||
VInf
|
VInf Bool -- True = with the particle "zu"
|
||||||
| VPresInd Number Person
|
| VFin Bool VFormFin -- True = prefix glued to verb
|
||||||
|
| VImper Number -- prefix never glued
|
||||||
|
| VPresPart AForm -- prefix always glued
|
||||||
|
| VPastPart AForm ;
|
||||||
|
|
||||||
|
param VFormFin =
|
||||||
|
VPresInd Number Person
|
||||||
| VPresSubj Number Person
|
| VPresSubj Number Person
|
||||||
| VImper Number
|
|
||||||
| VImpfInd Number Person --# notpresent
|
| VImpfInd Number Person --# notpresent
|
||||||
| VImpfSubj Number Person --# notpresent
|
| VImpfSubj Number Person --# notpresent
|
||||||
| VPresPart AForm
|
;
|
||||||
| VPastPart AForm ;
|
|
||||||
|
|
||||||
param VPForm =
|
param VPForm =
|
||||||
VPFinite Tense Anteriority
|
VPFinite Tense Anteriority
|
||||||
@@ -129,11 +133,11 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
_ => Weak
|
_ => Weak
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vFin : Tense -> Agr -> VForm = \t,a ->
|
vFin : Bool -> Tense -> Agr -> VForm = \b,t,a ->
|
||||||
case t of {
|
case t of {
|
||||||
Pres => VPresInd a.n a.p ;
|
Pres => VFin b (VPresInd a.n a.p) ;
|
||||||
Past => VImpfInd a.n a.p ; --# notpresent
|
Past => VFin b (VImpfInd a.n a.p) ; --# notpresent
|
||||||
_ => VInf --- never used
|
_ => VInf False --- never used
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
conjAgr : Agr -> Agr -> Agr = \a,b -> {
|
conjAgr : Agr -> Agr -> Agr = \a,b -> {
|
||||||
@@ -199,21 +203,22 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Str -> VAux -> Verb =
|
mkV : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Str -> VAux -> Verb =
|
||||||
\geben,gebe,gibst,gibt,gebt,gib,gab,gabst,gaben,gabt,gaebe,gegeben,ein,aux ->
|
\geben,gebe,gibst,gibt,gebt,gib,gab,gabst,gaben,
|
||||||
|
gabt,gaebe,gegeben,ein,aux ->
|
||||||
|
let
|
||||||
|
einb : Bool -> Str -> Str = \b,geb ->
|
||||||
|
if_then_Str b (ein + geb) geb ;
|
||||||
|
in
|
||||||
{s = table {
|
{s = table {
|
||||||
VInf => geben ;
|
VInf False => ein + geben ;
|
||||||
|
VInf True =>
|
||||||
|
if_then_Str (isNil ein) ("zu" ++ geben) (ein + "zu" + geben) ;
|
||||||
|
VFin b vf => einb b (case vf of {
|
||||||
VPresInd Sg P1 => gebe ;
|
VPresInd Sg P1 => gebe ;
|
||||||
VPresInd Sg P2 => gibst ;
|
VPresInd Sg P2 => gibst ;
|
||||||
VPresInd Sg P3 => gibt ;
|
VPresInd Sg P3 => gibt ;
|
||||||
VPresInd Pl P2 => gebt ;
|
VPresInd Pl P2 => gebt ;
|
||||||
VPresInd Pl _ => geben ;
|
VPresInd Pl _ => geben ;
|
||||||
VImper Sg => gib ;
|
|
||||||
VImper Pl => gebt ;
|
|
||||||
VPresSubj Sg P2 => init geben + "st" ;
|
|
||||||
VPresSubj Sg _ => init geben ;
|
|
||||||
VPresSubj Pl P2 => init geben + "t" ;
|
|
||||||
VPresSubj Pl _ => geben ;
|
|
||||||
VPresPart a => (regA (geben + "d")).s ! Posit ! a ;
|
|
||||||
VImpfInd Sg P2 => gabst ; --# notpresent
|
VImpfInd Sg P2 => gabst ; --# notpresent
|
||||||
VImpfInd Sg _ => gab ; --# notpresent
|
VImpfInd Sg _ => gab ; --# notpresent
|
||||||
VImpfInd Pl P2 => gabt ; --# notpresent
|
VImpfInd Pl P2 => gabt ; --# notpresent
|
||||||
@@ -222,7 +227,15 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
VImpfSubj Sg _ => gaebe ; --# notpresent
|
VImpfSubj Sg _ => gaebe ; --# notpresent
|
||||||
VImpfSubj Pl P2 => gaebe + "t" ; --# notpresent
|
VImpfSubj Pl P2 => gaebe + "t" ; --# notpresent
|
||||||
VImpfSubj Pl _ => gaebe + "n" ; --# notpresent
|
VImpfSubj Pl _ => gaebe + "n" ; --# notpresent
|
||||||
VPastPart a => (regA gegeben).s ! Posit ! a
|
VPresSubj Sg P2 => init geben + "st" ;
|
||||||
|
VPresSubj Sg _ => init geben ;
|
||||||
|
VPresSubj Pl P2 => init geben + "t" ;
|
||||||
|
VPresSubj Pl _ => geben
|
||||||
|
}) ;
|
||||||
|
VImper Sg => gib ;
|
||||||
|
VImper Pl => gebt ;
|
||||||
|
VPresPart a => ein + (regA (geben + "d")).s ! Posit ! a ;
|
||||||
|
VPastPart a => ein + (regA gegeben).s ! Posit ! a
|
||||||
} ;
|
} ;
|
||||||
prefix = ein ;
|
prefix = ein ;
|
||||||
aux = aux ;
|
aux = aux ;
|
||||||
@@ -324,7 +337,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- For $Verb$.
|
-- For $Verb$.
|
||||||
|
|
||||||
VP : Type = {
|
VP : Type = {
|
||||||
s : Agr => VPForm => {
|
s : Bool => Agr => VPForm => { -- True = prefix glued to verb
|
||||||
fin : Str ; -- hat
|
fin : Str ; -- hat
|
||||||
inf : Str -- wollen
|
inf : Str -- wollen
|
||||||
} ;
|
} ;
|
||||||
@@ -340,41 +353,44 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
predVGen : Bool -> Verb -> VP = \isAux, verb ->
|
predVGen : Bool -> Verb -> VP = \isAux, verb ->
|
||||||
let
|
let
|
||||||
vfin : Tense -> Agr -> Str = \t,a -> verb.s ! vFin t a ;
|
vfin : Bool -> Tense -> Agr -> Str = \b,t,a -> verb.s ! vFin b t a ;
|
||||||
vinf = verb.s ! VInf ;
|
vinf = verb.s ! VInf False ;
|
||||||
vpart = if_then_Str isAux vinf (verb.s ! VPastPart APred) ;
|
vpart = if_then_Str isAux vinf (verb.s ! VPastPart APred) ;
|
||||||
|
|
||||||
vHaben = auxPerfect verb ;
|
vHaben = auxPerfect verb ;
|
||||||
hat : Tense -> Agr -> Str = \t,a -> vHaben ! vFin t a ;
|
hat : Tense -> Agr -> Str = \t,a -> vHaben ! vFin False t a ;
|
||||||
haben : Str = vHaben ! VInf ;
|
haben : Str = vHaben ! VInf False ;
|
||||||
|
|
||||||
wird : Agr -> Str = \a -> werden_V.s ! VPresInd a.n a.p ;
|
wird : Agr -> Str = \a ->
|
||||||
wuerde : Agr -> Str = \a -> werden_V.s ! VImpfSubj a.n a.p ; --# notpresent
|
werden_V.s ! VFin False (VPresInd a.n a.p) ;
|
||||||
|
wuerde : Agr -> Str = \a -> --# notpresent
|
||||||
|
werden_V.s ! VFin False (VImpfSubj a.n a.p) ; --# notpresent
|
||||||
|
|
||||||
auf = verb.prefix ;
|
auf = verb.prefix ;
|
||||||
|
|
||||||
vf : Str -> Str -> {fin,inf : Str} = \fin,inf -> {
|
vf : Bool -> Str -> Str -> {fin,inf : Str} = \b,fin,inf -> {
|
||||||
fin = fin ; inf = auf ++ inf
|
fin = fin ;
|
||||||
|
inf = if_then_Str b [] auf ++ inf --- negation of main b
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
s = \\a => table {
|
s = \\b,a => table {
|
||||||
VPFinite t Simul => case t of {
|
VPFinite t Simul => case t of {
|
||||||
-- Pres | Past => vf (vfin t a) [] ; -- the general rule
|
-- Pres | Past => vf (vfin t a) [] ; -- the general rule
|
||||||
Past => vf (vfin t a) [] ; --# notpresent
|
Past => vf b (vfin b t a) [] ; --# notpresent
|
||||||
Fut => vf (wird a) vinf ; --# notpresent
|
Fut => vf True (wird a) vinf ; --# notpresent
|
||||||
Cond => vf (wuerde a) vinf ; --# notpresent
|
Cond => vf True (wuerde a) vinf ; --# notpresent
|
||||||
Pres => vf (vfin t a) []
|
Pres => vf b (vfin b t a) []
|
||||||
} ;
|
} ;
|
||||||
VPFinite t Anter => case t of { --# notpresent
|
VPFinite t Anter => case t of { --# notpresent
|
||||||
Pres | Past => vf (hat t a) vpart ; --# notpresent
|
Pres | Past => vf True (hat t a) vpart ; --# notpresent
|
||||||
Fut => vf (wird a) (vpart ++ haben) ; --# notpresent
|
Fut => vf True (wird a) (vpart ++ haben) ; --# notpresent
|
||||||
Cond => vf (wuerde a) (vpart ++ haben) --# notpresent
|
Cond => vf True (wuerde a) (vpart ++ haben) --# notpresent
|
||||||
} ; --# notpresent
|
} ; --# notpresent
|
||||||
VPImperat False => vf (verb.s ! VImper a.n) [] ;
|
VPImperat False => vf False (verb.s ! VImper a.n) [] ;
|
||||||
VPImperat True => vf (verb.s ! VPresSubj Pl P3) [] ;
|
VPImperat True => vf False (verb.s ! VFin False (VPresSubj Pl P3)) [] ;
|
||||||
VPInfinit Anter => vf [] (vpart ++ haben) ; --# notpresent
|
VPInfinit Anter => vf True [] (vpart ++ haben) ; --# notpresent
|
||||||
VPInfinit Simul => vf [] vinf
|
VPInfinit Simul => vf True [] (verb.s ! VInf b)
|
||||||
} ;
|
} ;
|
||||||
a1 : Polarity => Str = negation ;
|
a1 : Polarity => Str = negation ;
|
||||||
n2 : Agr => Str = case verb.vtype of {
|
n2 : Agr => Str = case verb.vtype of {
|
||||||
@@ -422,11 +438,11 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
[] VSein
|
[] VSein
|
||||||
in
|
in
|
||||||
{s = table {
|
{s = table {
|
||||||
VPresInd Pl (P1 | P3) => "sind" ;
|
VFin _ (VPresInd Pl (P1 | P3)) => "sind" ;
|
||||||
VPresSubj Sg P2 => (variants {"seiest" ; "seist"}) ;
|
VFin _ (VPresSubj Sg P2) => (variants {"seiest" ; "seist"}) ;
|
||||||
VPresSubj Sg _ => "sei" ;
|
VFin _ (VPresSubj Sg _) => "sei" ;
|
||||||
VPresSubj Pl P2 => "seiet" ;
|
VFin _ (VPresSubj Pl P2) => "seiet" ;
|
||||||
VPresSubj Pl _ => "seien" ;
|
VFin _ (VPresSubj Pl _) => "seien" ;
|
||||||
VPresPart a => (regA "seiend").s ! Posit ! a ;
|
VPresPart a => (regA "seiend").s ! Posit ! a ;
|
||||||
v => sein.s ! v
|
v => sein.s ! v
|
||||||
} ;
|
} ;
|
||||||
@@ -503,7 +519,11 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> {
|
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> {
|
||||||
s = \\t,a,b,o =>
|
s = \\t,a,b,o =>
|
||||||
let
|
let
|
||||||
verb = vp.s ! agr ! VPFinite t a ;
|
ord = case o of {
|
||||||
|
Sub => True ; -- glue prefix to verb
|
||||||
|
_ => False
|
||||||
|
} ;
|
||||||
|
verb = vp.s ! ord ! agr ! VPFinite t a ;
|
||||||
neg = vp.a1 ! b ;
|
neg = vp.a1 ! b ;
|
||||||
obj = vp.n2 ! agr ;
|
obj = vp.n2 ! agr ;
|
||||||
compl = obj ++ neg ++ vp.a2 ;
|
compl = obj ++ neg ++ vp.a2 ;
|
||||||
@@ -526,7 +546,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
infVP : Bool -> VP -> ((Agr => Str) * Str * Str) = \isAux, vp ->
|
infVP : Bool -> VP -> ((Agr => Str) * Str * Str) = \isAux, vp ->
|
||||||
<
|
<
|
||||||
\\agr => vp.n2 ! agr ++ vp.a2,
|
\\agr => vp.n2 ! agr ++ vp.a2,
|
||||||
infPart isAux ++ (vp.s ! agrP3 Sg ! VPInfinit Simul).inf,
|
(vp.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf,
|
||||||
vp.inf ++ vp.ext
|
vp.inf ++ vp.ext
|
||||||
> ;
|
> ;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
|||||||
_ => <P2,[],False>
|
_ => <P2,[],False>
|
||||||
} ;
|
} ;
|
||||||
agr = {g = Fem ; n = numImp n ; p = ps.p1} ; --- g does not matter
|
agr = {g = Fem ; n = numImp n ; p = ps.p1} ; --- g does not matter
|
||||||
verb = vp.s ! agr ! VPImperat ps.p3 ;
|
verb = vp.s ! False ! agr ! VPImperat ps.p3 ;
|
||||||
inf = vp.inf ++ verb.inf ;
|
inf = vp.inf ++ verb.inf ;
|
||||||
in
|
in
|
||||||
verb.fin ++ ps.p2 ++
|
verb.fin ++ ps.p2 ++
|
||||||
@@ -28,7 +28,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
|||||||
|
|
||||||
SlashVVV2 np vv v2 =
|
SlashVVV2 np vv v2 =
|
||||||
mkClause (np.s ! Nom) np.a
|
mkClause (np.s ! Nom) np.a
|
||||||
(insertInf (v2.prefix ++ infPart vv.isAux ++ v2.s ! VInf)
|
(insertInf (v2.prefix ++ v2.s ! VInf (notB vv.isAux))
|
||||||
(predVGen vv.isAux vv)) **
|
(predVGen vv.isAux vv)) **
|
||||||
{c2 = v2.c2} ;
|
{c2 = v2.c2} ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user