mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
The files for GrammarGer and AllGer (but not Construction, Documentation, Markup)
are edited to allow for glued Prep+DefArt, using new categories NP',Det',Quant',
Predet',DAP'.
The previous NP.s : Case => Str*Str allows parsing
"in dem Meer" = in_Prep ++ (np.s ! Case).p1
"im Meer" = in_Prep ++ (np.s ! Case).p2,
but since only one of the strings of (np.s!Case) is used, the tree
contains a metavariable like ?2 (the grammar is "erasing"). (Similarly, if we used
NP.s : Case => Str and NP.s2 : Case => Str.)
To get rid of the metavariables, we have to choose BY A PARAMETER, say
NP.s : droppedDefArt? => Case => Str
Using np.a = Ag g n p, the preposition can select between preposition
alone or preposition with definite article (glued or not), via
Prep = {s : GenNum => Str ; s2 :Str ; c : Case ; isPrep : PrepType }
The combination is done in appPrepNP' and appPrep'. This is
independent of the number of glued Prep+DefArt. But LangGer compiles
now in 200s using 30% memory (without SlashV2VNP). Can AppPrepNP' (and
insertObjNP') be simplified?
This commit is contained in:
@@ -20,12 +20,12 @@ abstract Conjunction' = Cat' ** {
|
|||||||
ConjS : Conj -> ListS -> S ; -- he walks and she runs
|
ConjS : Conj -> ListS -> S ; -- he walks and she runs
|
||||||
ConjRS : Conj -> ListRS -> RS ; -- who walks and whose mother runs
|
ConjRS : Conj -> ListRS -> RS ; -- who walks and whose mother runs
|
||||||
ConjAP : Conj -> ListAP -> AP ; -- cold and warm
|
ConjAP : Conj -> ListAP -> AP ; -- cold and warm
|
||||||
ConjNP' : Conj -> ListNP' -> NP' ; -- she or we
|
ConjNP : Conj -> ListNP' -> NP' ; -- she or we
|
||||||
ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
|
ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
|
||||||
ConjAdV : Conj -> ListAdV -> AdV ; -- always or sometimes
|
ConjAdV : Conj -> ListAdV -> AdV ; -- always or sometimes
|
||||||
ConjIAdv : Conj -> ListIAdv -> IAdv ; -- where and with whom
|
ConjIAdv : Conj -> ListIAdv -> IAdv ; -- where and with whom
|
||||||
ConjCN : Conj -> ListCN -> CN ; -- man and woman
|
ConjCN : Conj -> ListCN -> CN ; -- man and woman
|
||||||
ConjDet : Conj -> ListDAP -> Det ; -- his or her
|
ConjDet : Conj -> ListDAP -> Det' ; -- his or her
|
||||||
|
|
||||||
--2 Categories
|
--2 Categories
|
||||||
|
|
||||||
|
|||||||
@@ -21,4 +21,3 @@ abstract Grammar' =
|
|||||||
Tense,
|
Tense,
|
||||||
Transfer'
|
Transfer'
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ abstract Lang' =
|
|||||||
Lexicon
|
Lexicon
|
||||||
-- ,Construction --- could be compiled here, but not in concretes, as they call Syntax and Grammar
|
-- ,Construction --- could be compiled here, but not in concretes, as they call Syntax and Grammar
|
||||||
-- ,Documentation --# notpresent
|
-- ,Documentation --# notpresent
|
||||||
,Markup' - [stringMark]
|
-- ,Markup' - [stringMark]
|
||||||
** {
|
** {
|
||||||
flags startcat=Phr ;
|
flags startcat=Phr ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -148,11 +148,11 @@ abstract Noun' = Cat' ** {
|
|||||||
|
|
||||||
-- This is different from the partitive, as shown by many languages.
|
-- This is different from the partitive, as shown by many languages.
|
||||||
|
|
||||||
CountNP : Det -> NP -> NP ; -- three of them, some of the boys
|
CountNP : Det' -> NP' -> NP' ; -- three of them, some of the boys
|
||||||
|
|
||||||
--3 Conjoinable determiners and ones with adjectives
|
--3 Conjoinable determiners and ones with adjectives
|
||||||
|
|
||||||
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
AdjDAP : DAP' -> AP -> DAP' ; -- the large (one)
|
||||||
DetDAP : Det' -> DAP' ; -- this (or that)
|
DetDAP : Det' -> DAP' ; -- this (or that)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ abstract Question' = Cat' ** {
|
|||||||
|
|
||||||
-- Interrogative adverbs can be formed prepositionally.
|
-- Interrogative adverbs can be formed prepositionally.
|
||||||
|
|
||||||
PrepIP : Prep -> IP -> IAdv ; -- with whom
|
PrepIP : Prep' -> IP -> IAdv ; -- with whom
|
||||||
|
|
||||||
-- They can be modified with other adverbs.
|
-- They can be modified with other adverbs.
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ abstract Verb' = Cat' ** {
|
|||||||
ComplSlash : VPSlash -> NP' -> VP ; -- love it
|
ComplSlash : VPSlash -> NP' -> VP ; -- love it
|
||||||
|
|
||||||
SlashVV : VV -> VPSlash -> VPSlash ; -- want to buy
|
SlashVV : VV -> VPSlash -> VPSlash ; -- want to buy
|
||||||
SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
SlashV2VNP : V2V -> NP' -> VPSlash -> VPSlash ; -- beg me to buy
|
||||||
SlashV2VNP' : V2V -> NP' -> VPSlash -> VPSlash ; -- beg me to buy
|
|
||||||
|
|
||||||
--2 Other ways of forming verb phrases
|
--2 Other ways of forming verb phrases
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ resource CombinatorsGer = Combinators - [appCN, appCNc] with
|
|||||||
(Constructors = ConstructorsGer) **
|
(Constructors = ConstructorsGer) **
|
||||||
{
|
{
|
||||||
oper
|
oper
|
||||||
appCN : CN -> NP -> NP
|
appCN : CN -> NP' -> NP'
|
||||||
= \cn,x -> mkNP the_Art (PossNP cn x) ;
|
= \cn,x -> mkNP the_Art (PossNP cn x) ;
|
||||||
appCNc : CN -> [NP] -> NP
|
appCNc : CN -> [NP'] -> NP'
|
||||||
= \cn,xs -> let np : NP = mkNP and_Conj xs
|
= \cn,xs -> let np : NP' = mkNP and_Conj xs
|
||||||
in mkNP the_Art (PossNP cn np) ;
|
in mkNP the_Art (PossNP cn np) ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
--# -path=.:alltenses:prelude
|
--# -path=.:alltenses:prelude
|
||||||
|
|
||||||
resource ConstructorsGer = Constructors with (Grammar = GrammarGer) ;
|
resource ConstructorsGer = Constructors' with (Grammar = GrammarGer) ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:alltenses:prelude
|
--# -path=../abstract:.:alltenses:prelude:
|
||||||
|
|
||||||
instance SyntaxGer of Syntax = ConstructorsGer, CatGer, StructuralGer, CombinatorsGer ;
|
instance SyntaxGer of Syntax' = ConstructorsGer, CatGer, StructuralGer, CombinatorsGer ;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ concrete AdjectiveGer of Adjective' = CatGer ** open ResGer, Prelude in {
|
|||||||
ext = []
|
ext = []
|
||||||
} ;
|
} ;
|
||||||
ComparA a np =
|
ComparA a np =
|
||||||
let nps = (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ bigNP' np
|
let nps = np.s ! False ! Nom ++ bigNP' np
|
||||||
in {
|
in {
|
||||||
s = \\af => a.s ! Compar ! af ++ conjThan ++ nps ;
|
s = \\af => a.s ! Compar ! af ++ conjThan ++ nps ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
@@ -19,7 +19,7 @@ concrete AdjectiveGer of Adjective' = CatGer ** open ResGer, Prelude in {
|
|||||||
ext = []
|
ext = []
|
||||||
} ;
|
} ;
|
||||||
CAdvAP ad ap np =
|
CAdvAP ad ap np =
|
||||||
let nps = (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ bigNP' np in
|
let nps = np.s ! False ! Nom ++ bigNP' np in
|
||||||
ap ** {
|
ap ** {
|
||||||
s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ nps ;
|
s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ nps ;
|
||||||
isPre = False
|
isPre = False
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ concrete AdverbGer of Adverb' = CatGer ** open ResGer, Prelude in {
|
|||||||
PositAdvAdj a = {s = a.s ! Posit ! APred} ;
|
PositAdvAdj a = {s = a.s ! Posit ! APred} ;
|
||||||
|
|
||||||
ComparAdvAdj cadv a np =
|
ComparAdvAdj cadv a np =
|
||||||
let nps = (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ bigNP' np in
|
let nps = np.s ! False ! Nom ++ bigNP' np in
|
||||||
{
|
{
|
||||||
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ nps
|
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ nps
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
--# -path=.:../abstract:../common:../api:../prelude
|
--# -path=.:../abstract:../common:../api:../prelude
|
||||||
|
|
||||||
concrete AllGer of AllGerAbs =
|
concrete AllGer of AllGerAbs' =
|
||||||
LangGer,
|
LangGer,
|
||||||
IrregGer,
|
IrregGer,
|
||||||
---- ExtendGer, ---- to replace ExtraGer
|
---- ExtendGer, ---- to replace ExtraGer
|
||||||
ExtraGer
|
ExtraGer
|
||||||
**
|
-- ** open ExtendGer in {} ---- to force compilation HL 7/22 todo: ListNP' in ExtendGer
|
||||||
open ExtendGer in ---- to force compilation
|
;
|
||||||
{} ;
|
|
||||||
|
|||||||
@@ -58,8 +58,9 @@ concrete CatGer of Cat' =
|
|||||||
adv : Str ; -- Haus [adv auf dem Hügel]
|
adv : Str ; -- Haus [adv auf dem Hügel]
|
||||||
g : Gender
|
g : Gender
|
||||||
} ;
|
} ;
|
||||||
NP = ResGer.NP ;
|
-- NP = ResGer.NP ;
|
||||||
Pron = {s : NPForm => Str ; a : Agr} ;
|
Pron = {s : NPForm => Str ; a : Agr} ;
|
||||||
|
{-
|
||||||
Det, DAP = {s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} ;
|
Det, DAP = {s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} ;
|
||||||
Quant = {
|
Quant = {
|
||||||
s : Bool => Number => Gender => PCase => Str ; -- Bool is True if a cardinal number is present
|
s : Bool => Number => Gender => PCase => Str ; -- Bool is True if a cardinal number is present
|
||||||
@@ -72,14 +73,15 @@ concrete CatGer of Cat' =
|
|||||||
c : {p : Str ; k : PredetCase} ;
|
c : {p : Str ; k : PredetCase} ;
|
||||||
a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ...
|
a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ...
|
||||||
} ;
|
} ;
|
||||||
|
-}
|
||||||
-- HL: To reduce PCase to Case:
|
-- HL: To reduce PCase to Case:
|
||||||
NP' = ResGer.NP' ;
|
NP' = ResGer.NP' ;
|
||||||
Det' = {s,sp : Gender => Case => {quant,num:Str}; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
Det' = {s,sp : Bool => Gender => Case => Str ; -- True if DefArt is dropped
|
||||||
|
n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
||||||
DAP' = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
DAP' = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
||||||
Quant' = {
|
Quant' = { -- HL 7/2022: first Bool = True if used to glue in Sg with preposition
|
||||||
s : Bool => Number => Gender => Case => Str ; -- Bool is True if a cardinal number is present
|
s : Bool => Bool => Number => Gender => Case => Str ; -- second Bool is True if a cardinal number is present
|
||||||
sp : Bool => Number => Gender => Case => Str ;
|
sp : Bool => Bool => Number => Gender => Case => Str ;
|
||||||
a : Adjf ;
|
a : Adjf ;
|
||||||
aPl : Adjf ; --- to distinguish "meine guten Freunde" / "gute Freunde"
|
aPl : Adjf ; --- to distinguish "meine guten Freunde" / "gute Freunde"
|
||||||
hasDefArt : Bool
|
hasDefArt : Bool
|
||||||
@@ -103,7 +105,7 @@ concrete CatGer of Cat' =
|
|||||||
|
|
||||||
Conj = {s1,s2 : Str ; n : Number} ;
|
Conj = {s1,s2 : Str ; n : Number} ;
|
||||||
Subj = {s : Str} ;
|
Subj = {s : Str} ;
|
||||||
Prep = Preposition ;
|
-- Prep = Preposition ;
|
||||||
Prep' = Preposition' ;
|
Prep' = Preposition' ;
|
||||||
|
|
||||||
-- Open lexical classes, e.g. Lexicon
|
-- Open lexical classes, e.g. Lexicon
|
||||||
@@ -128,29 +130,29 @@ concrete CatGer of Cat' =
|
|||||||
Tense = {s : Str ; t : ResGer.Tense ; m : Mood} ;
|
Tense = {s : Str ; t : ResGer.Tense ; m : Mood} ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
NP = \np -> np.s!(NPC Nom) ++ np.ext ++ np.rc ; -- HL 6/2019
|
-- NP = \np -> np.s!(NPC Nom) ++ np.ext ++ np.rc ; -- HL 6/2019
|
||||||
NP' = \np -> (np.s!Nom).p1 ++ (np.s!Nom).p2 ++ np.ext ++ np.rc ; -- HL 7/2022
|
NP' = \np -> np.s ! False ! Nom ++ np.ext ++ np.rc ; -- HL 7/2022 Bool added
|
||||||
CN = \cn -> cn.s ! Strong ! Pl ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Pl ;
|
CN = \cn -> cn.s ! Strong ! Pl ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Pl ;
|
||||||
|
|
||||||
SSlash = \ss -> ss.s ! Main ++ ss.c2.s ;
|
SSlash = \ss -> ss.s ! Main ++ ss.c2.s ! GPl ;
|
||||||
ClSlash = \cls -> cls.s ! MIndic ! Pres ! Simul ! Pos ! Main ++ cls.c2.s ;
|
ClSlash = \cls -> cls.s ! MIndic ! Pres ! Simul ! Pos ! Main ++ cls.c2.s ! GPl ;
|
||||||
|
|
||||||
VP = \vp -> useInfVP False vp ;
|
VP = \vp -> useInfVP False vp ;
|
||||||
VPSlash = \vps -> useInfVP False vps ++ vps.c2.s ++ vps.ext;
|
VPSlash = \vps -> useInfVP False vps ++ vps.c2.s ! GPl ++ vps.ext;
|
||||||
|
|
||||||
AP = \ap -> ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ++ ap.ext ;
|
AP = \ap -> ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ++ ap.ext ;
|
||||||
A2 = \a2 -> a2.s ! Posit ! APred ++ a2.c2.s ;
|
A2 = \a2 -> a2.s ! Posit ! APred ++ a2.c2.s ! GPl ;
|
||||||
|
|
||||||
V, VS, VQ, VA = \v -> useInfVP False (predV v) ;
|
V, VS, VQ, VA = \v -> useInfVP False (predV v) ;
|
||||||
V2, V2A, V2Q, V2S = \v -> useInfVP False (predV v) ++ v.c2.s ;
|
V2, V2A, V2Q, V2S = \v -> useInfVP False (predV v) ++ v.c2.s ! GPl ;
|
||||||
V3 = \v -> useInfVP False (predV v) ++ v.c2.s ++ v.c3.s ;
|
V3 = \v -> useInfVP False (predV v) ++ v.c2.s ! GPl ++ v.c3.s ! GPl;
|
||||||
|
|
||||||
VV = \v -> useInfVP v.isAux (predVGen v.isAux v) ;
|
VV = \v -> useInfVP v.isAux (predVGen v.isAux v) ;
|
||||||
V2V = \v -> useInfVP v.isAux (predVGen v.isAux v) ++ v.c2.s ;
|
V2V = \v -> useInfVP v.isAux (predVGen v.isAux v) ++ v.c2.s ! GPl ;
|
||||||
|
|
||||||
Conj = \c -> c.s1 ++ c.s2 ;
|
Conj = \c -> c.s1 ++ c.s2 ;
|
||||||
|
|
||||||
Det' = \det -> (det.s ! Masc ! Nom).quant ++ (det.s ! Masc ! Nom).num ;
|
Det' = \det -> det.s ! False ! Masc ! Nom ;
|
||||||
Prep' = \prep -> case prep.isPrep of {PrepDefArf => prep.sg ! Masc ;
|
Prep' = \prep -> case prep.isPrep of {isPrepDefArt => prep.s ! GSg Masc ;
|
||||||
_ => prep.s ++ prep.s2 } ;
|
_ => prep.s ! GPl } ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,11 @@ concrete ConjunctionGer of Conjunction' =
|
|||||||
|
|
||||||
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
||||||
|
|
||||||
ConjNP conj ss = heavyNP' (conjunctDistrTable Case conj ss ** {
|
-- ConjNP : Conj -> ListNP' -> NP' ; -- she or we
|
||||||
|
|
||||||
|
ConjNP conj ss = { s = \\_ => (conjunctDistrTable Case conj { s1 = ss.s1 ; s2 = ss.s2 }).s } ** {
|
||||||
a = Ag Fem (conjNumber conj.n (numberAgr ss.a)) (personAgr ss.a) ;
|
a = Ag Fem (conjNumber conj.n (numberAgr ss.a)) (personAgr ss.a) ;
|
||||||
}) ;
|
w = WHeavy' ; ext,rc = [] } ;
|
||||||
|
|
||||||
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
||||||
isPre = ss.isPre ; c = ss.c ; ext = ss.ext} ;
|
isPre = ss.isPre ; c = ss.c ; ext = ss.ext} ;
|
||||||
@@ -38,12 +40,12 @@ concrete ConjunctionGer of Conjunction' =
|
|||||||
|
|
||||||
BaseAdv = twoSS ;
|
BaseAdv = twoSS ;
|
||||||
ConsAdv = consrSS comma ;
|
ConsAdv = consrSS comma ;
|
||||||
BaseNP x y = {
|
BaseNP' x y = {
|
||||||
s1 = \\c => (x.s ! c).p1 ++ (x.s ! c).p2 ++ bigNP x ;
|
s1 = \\c => x.s ! False ! c ++ bigNP' x ;
|
||||||
s2 = \\c => y.s ! c ++ bigNP y ;
|
s2 = \\c => y.s ! False ! c ++ bigNP' y ;
|
||||||
a = conjAgr x.a y.a } ;
|
a = conjAgr x.a y.a } ;
|
||||||
ConsNP xs x = {
|
ConsNP' xs x = {
|
||||||
s1 = \\c => (x.s ! c).p1 ++ (x.s ! c).p2 ++ bigNP xs ++ comma ++ x.s1 ! c ;
|
s1 = \\c => xs.s ! False ! c ++ bigNP' xs ++ comma ++ x.s1 ! c ;
|
||||||
s2 = x.s2 ;
|
s2 = x.s2 ;
|
||||||
a = conjAgr xs.a x.a } ;
|
a = conjAgr xs.a x.a } ;
|
||||||
BaseAP x y = {
|
BaseAP x y = {
|
||||||
@@ -75,7 +77,8 @@ concrete ConjunctionGer of Conjunction' =
|
|||||||
lincat
|
lincat
|
||||||
[S] = {s1,s2 : Order => Str} ;
|
[S] = {s1,s2 : Order => Str} ;
|
||||||
[Adv] = {s1,s2 : Str} ;
|
[Adv] = {s1,s2 : Str} ;
|
||||||
[NP] = {s1,s2 : PCase => Str ; a : Agr} ;
|
-- [NP] = {s1,s2 : PCase => Str ; a : Agr} ;
|
||||||
|
[NP'] = {s1,s2 : Case => Str ; a : Agr} ;
|
||||||
[AP] = {s1,s2 : AForm => Str ; isPre : Bool; c : Str * Str ; ext : Str} ;
|
[AP] = {s1,s2 : AForm => Str ; isPre : Bool; c : Str * Str ; ext : Str} ;
|
||||||
[RS] = {s1,s2 : RelGenNum => Str ; c : Case} ;
|
[RS] = {s1,s2 : RelGenNum => Str ; c : Case} ;
|
||||||
[CN] = {s1,s2 : Adjf => Number => Case => Str ; g : Gender} ;
|
[CN] = {s1,s2 : Adjf => Number => Case => Str ; g : Gender} ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../abstract
|
--# -path=.:../abstract
|
||||||
|
|
||||||
concrete ConstructionGer of Construction = CatGer **
|
concrete ConstructionGer of Construction' = CatGer **
|
||||||
open SyntaxGer, SymbolicGer, ParadigmsGer,
|
open SyntaxGer, SymbolicGer, ParadigmsGer,
|
||||||
(L = LexiconGer), (E = ExtraGer), (G = GrammarGer), (I = IrregGer), (R = ResGer), (N = NounGer), Prelude in {
|
(L = LexiconGer), (E = ExtraGer), (G = GrammarGer), (I = IrregGer), (R = ResGer), (N = NounGer), Prelude in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete ExtraGer of ExtraGerAbs = CatGer **
|
concrete ExtraGer of ExtraGerAbs' = CatGer **
|
||||||
open ResGer, Coordination, Prelude, IrregGer, (P = ParadigmsGer) in {
|
open ResGer, Coordination, Prelude, IrregGer, (P = ParadigmsGer) in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
@@ -34,30 +34,27 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
IAdvAdv adv = {s = "wie" ++ adv.s} ;
|
IAdvAdv adv = {s = "wie" ++ adv.s} ;
|
||||||
|
|
||||||
DetNPMasc det = {
|
DetNPMasc det = {
|
||||||
s = \\c => det.sp ! Masc ! c ; ---- genders
|
s = \\b,c => det.sp ! b ! Masc ! c ;
|
||||||
a = agrP3 det.n ;
|
a = agrgP3 Masc det.n ;
|
||||||
w = WLight ;
|
w = case det.isDef of { True => WLight' ; _ => WHeavy' } ;
|
||||||
ext, rc = []
|
ext, rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNPFem det = {
|
DetNPFem det = {
|
||||||
s = \\c => det.sp ! Fem ! c ; ---- genders
|
s = \\b,c => det.sp ! b ! Fem ! c ;
|
||||||
a = agrP3 det.n ;
|
a = agrgP3 Fem det.n ;
|
||||||
w = WLight ;
|
w = case det.isDef of { True => WLight' ; _ => WHeavy' } ;
|
||||||
ext, rc = []
|
ext, rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
EmptyRelSlash slash = {
|
EmptyRelSlash slash = {
|
||||||
s = \\m,t,a,p,gn =>
|
s = \\m,t,a,p,gn =>
|
||||||
appPrep slash.c2 (\\k => usePrepC k (\c -> relPron ! gn ! c)) ++
|
appPrep' slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ;
|
||||||
slash.s ! m ! t ! a ! p ! Sub ;
|
c = slash.c2.c
|
||||||
c = (prepC slash.c2.c).c
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PassVPSlash vp =
|
PassVPSlash vp =
|
||||||
let c = case <vp.c2.c,vp.c2.isPrep> of {
|
let c = case <vp.c2.c,vp.c2.isPrep> of {<Acc,isCase> => Nom ; _ => vp.c2.c}
|
||||||
<NPC Acc,False> => NPC Nom ;
|
|
||||||
_ => vp.c2.c}
|
|
||||||
in insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
in insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
||||||
{ c1 = vp.c2 ** {c = c}} ;
|
{ c1 = vp.c2 ** {c = c}} ;
|
||||||
-- regulates passivised object: accusative objects -> nom; all others: same case
|
-- regulates passivised object: accusative objects -> nom; all others: same case
|
||||||
@@ -70,7 +67,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
Pass3V3 v = -- HL 7/19
|
Pass3V3 v = -- HL 7/19
|
||||||
let bekommenPass : Verb = P.habenV (P.irregV "bekommen" "bekommt" "bekam" "bekäme" "bekommen")
|
let bekommenPass : Verb = P.habenV (P.irregV "bekommen" "bekommt" "bekam" "bekäme" "bekommen")
|
||||||
in insertObj (\\_ => (v.s ! VPastPart APred)) (predV bekommenPass) **
|
in insertObj (\\_ => (v.s ! VPastPart APred)) (predV bekommenPass) **
|
||||||
{ c1 = PrepNom ; c2 = v.c2 ; objCtrl = False } ;
|
{ c1 = PrepNom' ; c2 = v.c2 ; objCtrl = False } ;
|
||||||
|
|
||||||
PastPartAP vp =
|
PastPartAP vp =
|
||||||
let a = agrP3 Sg in {
|
let a = agrP3 Sg in {
|
||||||
@@ -83,11 +80,11 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
|
|
||||||
PastPartAgentAP vp np =
|
PastPartAgentAP vp np =
|
||||||
let a = agrP3 Sg ;
|
let a = agrP3 Sg ;
|
||||||
agent = appPrepNP P.von_Prep np
|
agent = appPrepNP' P.von_Prep np
|
||||||
in {
|
in {
|
||||||
s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3
|
s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3
|
||||||
++ vp.a2 ++ agent ++ vp.inf.inpl.p2
|
++ vp.a2 ++ agent ++ vp.inf.inpl.p2
|
||||||
++ vp.c2.s -- junk if not TV
|
++ vp.c2.s ! GPl -- junk if not TV
|
||||||
++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
|
++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = <[],[]> ;
|
c = <[],[]> ;
|
||||||
@@ -104,7 +101,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
|
|
||||||
PredVPS np vpi =
|
PredVPS np vpi =
|
||||||
let
|
let
|
||||||
subj = np.s ! NPC Nom ++ bigNP np ;
|
subj = np.s ! False ! Nom ++ bigNP' np ;
|
||||||
agr = np.a ;
|
agr = np.a ;
|
||||||
in {
|
in {
|
||||||
s = \\o =>
|
s = \\o =>
|
||||||
@@ -178,8 +175,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
RNP = {s : Agr => Case => Str} ;
|
RNP = {s : Agr => Case => Str} ;
|
||||||
lin
|
lin
|
||||||
ReflRNP vps rnp =
|
ReflRNP vps rnp =
|
||||||
insertObj (\\a => appPrep vps.c2
|
insertObj (\\a => appPrep' vps.c2 (rnp.s ! a)) vps ;
|
||||||
(\\k => usePrepC k (\c -> rnp.s ! a ! c))) vps ;
|
|
||||||
|
|
||||||
ReflPoss num cn = {s = \\a,c => num.s ! cn.g ! c ++ possPron a num.n cn.g c ++ cn.s ! adjfCase Strong c ! num.n ! c} ;
|
ReflPoss num cn = {s = \\a,c => num.s ! cn.g ! c ++ possPron a num.n cn.g c ++ cn.s ! adjfCase Strong c ! num.n ! c} ;
|
||||||
|
|
||||||
@@ -206,7 +202,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
FocObj np cl =
|
FocObj np cl =
|
||||||
let n = appPrepNP cl.c2 np in mkFoc n cl ;
|
let n = appPrepNP' cl.c2 np in mkFoc n cl ;
|
||||||
|
|
||||||
FocAdv adv cl = mkFoc adv.s cl ;
|
FocAdv adv cl = mkFoc adv.s cl ;
|
||||||
|
|
||||||
@@ -218,7 +214,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
-- "treu ist sie ihm"
|
-- "treu ist sie ihm"
|
||||||
-- "froh ist sie dass er da ist"
|
-- "froh ist sie dass er da ist"
|
||||||
-- "stolz ist sie auf ihn"
|
-- "stolz ist sie auf ihn"
|
||||||
subj = mkSubj np vp.c1 ;
|
subj = mkSubj' np vp.c1 ;
|
||||||
cl = mkClause subj.p1 subj.p2 vp
|
cl = mkClause subj.p1 subj.p2 vp
|
||||||
in mkFoc adj cl ;
|
in mkFoc adj cl ;
|
||||||
|
|
||||||
@@ -243,7 +239,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
-- "es wird gelacht"; generating formal sentences
|
-- "es wird gelacht"; generating formal sentences
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
FClause = ResGer.VP ** {subj : ResGer.NP} ;
|
FClause = ResGer.VP ** {subj : ResGer.NP'} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
VPass v =
|
VPass v =
|
||||||
@@ -254,7 +250,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
AdvFor adv fcl = fcl ** {a2 = adv.s} ;
|
AdvFor adv fcl = fcl ** {a2 = adv.s} ;
|
||||||
|
|
||||||
FtoCl cl =
|
FtoCl cl =
|
||||||
let subj = mkSubj cl.subj cl.c1
|
let subj = mkSubj' cl.subj cl.c1
|
||||||
in DisToCl subj.p1 subj.p2 cl ;
|
in DisToCl subj.p1 subj.p2 cl ;
|
||||||
|
|
||||||
|
|
||||||
@@ -263,11 +259,11 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
mkFoc : Str -> Cl -> Foc = \focus, cl ->
|
mkFoc : Str -> Cl -> Foc = \focus, cl ->
|
||||||
lin Foc {s = \\m,t,a,p => focus ++ cl.s ! m ! t ! a ! p ! Inv} ;
|
lin Foc {s = \\m,t,a,p => focus ++ cl.s ! m ! t ! a ! p ! Inv} ;
|
||||||
|
|
||||||
esSubj : CatGer.NP = lin NP {
|
esSubj : CatGer.NP' = lin NP' {
|
||||||
s = \\_ => "es" ;
|
s = \\_,_ => "es" ;
|
||||||
rc, ext = [] ;
|
rc, ext = [] ;
|
||||||
a = Ag Neutr Sg P3 ;
|
a = Ag Neutr Sg P3 ;
|
||||||
w = WPron
|
w = WPron'
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DisToCl : Str -> Agr -> FClause -> Clause = \subj,agr,vp ->
|
DisToCl : Str -> Agr -> FClause -> Clause = \subj,agr,vp ->
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ concrete GrammarGer of Grammar' =
|
|||||||
PhraseGer,
|
PhraseGer,
|
||||||
TextX - [Tense,Temp],
|
TextX - [Tense,Temp],
|
||||||
IdiomGer,
|
IdiomGer,
|
||||||
StructuralGer,
|
StructuralGer - [part_Prep,possess_Prep], -- use PartNP, PossNP instead
|
||||||
TenseGer
|
TenseGer
|
||||||
** {
|
** {
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ concrete IdiomGer of Idiom' = CatGer **
|
|||||||
|
|
||||||
CleftNP np rs = mkClause "es" (agrP3 Sg)
|
CleftNP np rs = mkClause "es" (agrP3 Sg)
|
||||||
(insertExtrapos (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a))) ----
|
(insertExtrapos (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a))) ----
|
||||||
-- (insertObj (\\_ => np.s ! NPC rs.c ++ bigNP np) (predV MorphoGer.sein_V))) ;
|
(insertObj (\\_ => (np.s ! False ! rs.c ++ bigNP' np)) (predV MorphoGer.sein_V))) ; --HL
|
||||||
(insertObj (\\_ => (np.s ! rs.c).p1 ++ (np.s ! rs.c).p2 ++ bigNP' np) (predV MorphoGer.sein_V))) ; --HL
|
|
||||||
|
|
||||||
CleftAdv ad s = mkClause "es" (agrP3 Sg)
|
CleftAdv ad s = mkClause "es" (agrP3 Sg)
|
||||||
(insertExtrapos (conjThat ++ s.s ! Sub)
|
(insertExtrapos (conjThat ++ s.s ! Sub)
|
||||||
@@ -20,14 +19,13 @@ concrete IdiomGer of Idiom' = CatGer **
|
|||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkClause "es" (agrP3 Sg)
|
mkClause "es" (agrP3 Sg)
|
||||||
(insertObj (\\_ => appPrep2' geben.c2 np.s ++ bigNP' np)
|
(insertObj (\\_ => appPrep' geben.c2 (np.s ! False) ++ bigNP' np)
|
||||||
(predV geben)) ;
|
(predV geben)) ;
|
||||||
|
|
||||||
ExistIP ip = {
|
ExistIP ip = {
|
||||||
s = \\m,t,a,p =>
|
s = \\m,t,a,p =>
|
||||||
let
|
let
|
||||||
cls =
|
cls = (mkClause "es" (agrP3 Sg) (predV geben)).s ! m ! t ! a ! p ;
|
||||||
(mkClause "es" (agrP3 Sg) (predV geben)).s ! m ! t ! a ! p ;
|
|
||||||
who = ip.s ! Acc
|
who = ip.s ! Acc
|
||||||
in table {
|
in table {
|
||||||
QDir => who ++ cls ! Inv ;
|
QDir => who ++ cls ! Inv ;
|
||||||
@@ -38,7 +36,7 @@ concrete IdiomGer of Idiom' = CatGer **
|
|||||||
ExistNPAdv np adv=
|
ExistNPAdv np adv=
|
||||||
mkClause "es" (agrP3 Sg)
|
mkClause "es" (agrP3 Sg)
|
||||||
-- (insertAdv adv.s (insertObj (\\_ => appPrep geben.c2 np.s ++ bigNP np)
|
-- (insertAdv adv.s (insertObj (\\_ => appPrep geben.c2 np.s ++ bigNP np)
|
||||||
(insertAdv adv.s (insertObj (\\_ => appPrep2' geben.c2 np.s ++ bigNP' np)
|
(insertAdv adv.s (insertObj (\\_ => appPrep' geben.c2 (np.s ! False) ++ bigNP' np)
|
||||||
(predV geben))) ;
|
(predV geben))) ;
|
||||||
|
|
||||||
ExistIPAdv ip adv = {
|
ExistIPAdv ip adv = {
|
||||||
@@ -68,7 +66,7 @@ concrete IdiomGer of Idiom' = CatGer **
|
|||||||
SelfAdvVP vp = insertAdv "selbst" vp ;
|
SelfAdvVP vp = insertAdv "selbst" vp ;
|
||||||
SelfAdVVP vp = insertAdv "selbst" vp ;
|
SelfAdVVP vp = insertAdv "selbst" vp ;
|
||||||
SelfNP np = np ** {
|
SelfNP np = np ** {
|
||||||
s = \\c => <(np.s ! c).p1, (np.s ! c).p2 ++ "selbst" ++ bigNP' np> ;
|
s = \\_,c => np.s ! False ! c ++ "selbst" ++ bigNP' np ;
|
||||||
isPron = False ;
|
isPron = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ concrete LangGer of Lang' =
|
|||||||
LexiconGer
|
LexiconGer
|
||||||
-- ,ConstructionGer
|
-- ,ConstructionGer
|
||||||
-- ,DocumentationGer --# notpresent
|
-- ,DocumentationGer --# notpresent
|
||||||
,MarkupGer - [stringMark]
|
-- ,MarkupGer - [stringMark]
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
@@ -214,7 +214,8 @@ lin
|
|||||||
university_N = reg2N "Universität" "Universitäten" feminine ;
|
university_N = reg2N "Universität" "Universitäten" feminine ;
|
||||||
village_N = reg2N "Dorf" "Dörfer" neuter ;
|
village_N = reg2N "Dorf" "Dörfer" neuter ;
|
||||||
-- wait_V2 = prepV2 (regV "warten") (mkPrep "auf" accusative) ;
|
-- wait_V2 = prepV2 (regV "warten") (mkPrep "auf" accusative) ;
|
||||||
wait_V2 = prepV2 (regV "warten") (mkPrep "auf" "auf den" "auf die" "aufs" accusative) ;
|
-- wait_V2 = prepV2 (regV "warten") ((mkPrep "auf" "auf den" "auf die" "aufs" accusative) | (mkPrep "auf" accusative));
|
||||||
|
wait_V2 = prepV2 (regV "warten") (mkPrep "auf" "auf den" "auf die" ("aufs" | "auf das") accusative);
|
||||||
walk_V = seinV Irreg.gehen_V ;
|
walk_V = seinV Irreg.gehen_V ;
|
||||||
warm_A = mk3A "warm" "wärmer" "wärmste" ;
|
warm_A = mk3A "warm" "wärmer" "wärmste" ;
|
||||||
war_N = mkN "Krieg" ;
|
war_N = mkN "Krieg" ;
|
||||||
|
|||||||
@@ -11,27 +11,27 @@ oper
|
|||||||
{s = \\_,_,_ => s ; lock_IQuant = <>} ;
|
{s = \\_,_,_ => s ; lock_IQuant = <>} ;
|
||||||
|
|
||||||
mkPredet = overload {
|
mkPredet = overload {
|
||||||
mkPredet : A -> Predet = \a ->
|
mkPredet : A -> Predet' = \a ->
|
||||||
lin Predet {
|
lin Predet' {
|
||||||
s = appAdj a ;
|
s = appAdj' a ;
|
||||||
c = noCase ;
|
c = noCase' ;
|
||||||
a = PAgNone
|
a = PAgNone
|
||||||
} ;
|
} ;
|
||||||
mkPredet : A -> Str -> PCase -> Bool -> Number -> Predet = \a,p,c,b,n ->
|
mkPredet : A -> Str -> Case -> Bool -> Number -> Predet' = \a,p,c,b,n ->
|
||||||
lin Predet {
|
lin Predet' {
|
||||||
s = appAdj a ;
|
s = appAdj' a ;
|
||||||
c = {p = p ; k = PredCase c} ;
|
c = {p = p ; k = PredCase' c} ;
|
||||||
a = case b of {True => PAg n ; _ => PAgNone}
|
a = case b of {True => PAg n ; _ => PAgNone}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- e.g. das selbe
|
-- e.g. das selbe
|
||||||
mmkQuant : Quant -> A -> Quant = \q,a -> q ** {
|
mmkQuant : Quant' -> A -> Quant' = \q,a -> q ** {
|
||||||
s,sp = \\x,n,g,c => q.s ! x ! n ! g ! c ++ a.s ! Posit ! agrAdj g q.a n ((prepC c).c)
|
s,sp = \\b,x,n,g,c => q.s ! b ! x ! n ! g ! c ++ a.s ! Posit ! agrAdj g q.a n c
|
||||||
} ;
|
} ;
|
||||||
-- e.g. derjenige
|
-- e.g. derjenige
|
||||||
mmbQuant : Quant -> A -> Quant = \q,a -> q ** {
|
mmbQuant : Quant' -> A -> Quant' = \q,a -> q ** {
|
||||||
s,sp = \\x,n,g,c => q.s ! x ! n ! g ! c + a.s ! Posit ! agrAdj g q.a n ((prepC c).c)
|
s,sp = \\b,x,n,g,c => q.s ! b ! x ! n ! g ! c + a.s ! Posit ! agrAdj g q.a n c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
concrete MarkupGer of Markup' = CatGer, MarkHTMLX ** {
|
concrete MarkupGer of Markup = CatGer, MarkHTMLX ** {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MarkupCN m cn = cn ** {s = \\a,n,c => appMark m (cn.s ! a ! n ! c)} ; --- other fields e.g ext intact
|
MarkupCN m cn = cn ** {s = \\a,n,c => appMark m (cn.s ! a ! n ! c)} ; --- other fields e.g ext intact
|
||||||
MarkupNP m np = np ** {s = \\c => appMark m (np.s ! c)} ;
|
MarkupNP m np = np ** {s = \\c => appMark m (np.s ! c)} ;
|
||||||
MarkupNP' m np = np ** {s = \\c => appMark2 m (np.s ! c)} ;
|
|
||||||
MarkupAP m ap = ap ** {s = \\a => appMark m (ap.s ! a)} ;
|
MarkupAP m ap = ap ** {s = \\a => appMark m (ap.s ! a)} ;
|
||||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||||
MarkupS m s = {s = \\o => appMark m (s.s ! o)} ;
|
MarkupS m s = {s = \\o => appMark m (s.s ! o)} ;
|
||||||
@@ -13,8 +12,5 @@ lin
|
|||||||
MarkupPhr m phr = {s = appMark m phr.s} ;
|
MarkupPhr m phr = {s = appMark m phr.s} ;
|
||||||
MarkupText m txt = {s = appMark m txt.s} ;
|
MarkupText m txt = {s = appMark m txt.s} ;
|
||||||
|
|
||||||
oper
|
|
||||||
appMark2 : {begin,end : Str} -> Str * Str -> Str * Str
|
|
||||||
= \m,s -> <m.begin ++ s.p1, s.p2 ++ m.end> ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,35 +18,19 @@ oper
|
|||||||
-- For $StructuralGer$.
|
-- For $StructuralGer$.
|
||||||
|
|
||||||
mkPrep : Str -> Case -> Preposition' = \s,c ->
|
mkPrep : Str -> Case -> Preposition' = \s,c ->
|
||||||
{s = s ; s2 = [] ; c = c ; sg = \\_ => [] ; isPrep = isPrep} ;
|
{s = \\_ => s ; s2 = [] ; c = c ; isPrep = isPrep} ;
|
||||||
|
|
||||||
nameNounPhrase : {s : Case => Str} -> {s : PCase => Str ; a : Agr ;
|
nameNounPhrase' : Gender -> {s : Case => Str} -> {s : Bool => Case => Str ;
|
||||||
-- isLight, isPron : Bool ;
|
|
||||||
w : Weight ;
|
|
||||||
ext,rc : Str} = \name -> heavyNP {
|
|
||||||
s = \\c => usePrepC c (\k -> name.s ! k) ;
|
|
||||||
a = agrP3 Sg
|
|
||||||
} ;
|
|
||||||
nameNounPhrase' : Gender -> {s : Case => Str} -> {s : Case => Str * Str;
|
|
||||||
a : Agr ;
|
a : Agr ;
|
||||||
w : Weight' ;
|
w : Weight' ;
|
||||||
ext,rc : Str} =
|
ext,rc : Str} =
|
||||||
\g,name -> {
|
\g,name -> {
|
||||||
s = \\c => <[],name.s ! c> ;
|
s = \\_,c => name.s ! c ;
|
||||||
a = agrgP3 g Sg ;
|
a = agrgP3 g Sg ;
|
||||||
ext,rc = [] ;
|
ext,rc = [] ;
|
||||||
w = WHeavy' -- ok?
|
w = WHeavy' -- ok?
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
detLikeAdj : Bool -> Number -> Str ->
|
|
||||||
{s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
|
||||||
{s,sp = appAdj (regA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ;
|
|
||||||
|
|
||||||
detUnlikeAdj : Bool -> Number -> Str ->
|
|
||||||
{s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
|
||||||
{s,sp = appAdj (regDetA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ;
|
|
||||||
|
|
||||||
-- HL: to reduce PCase to Case:
|
|
||||||
detLikeAdj' : Bool -> Number -> Str ->
|
detLikeAdj' : Bool -> Number -> Str ->
|
||||||
{s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
{s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
||||||
{s,sp = appAdj' (regA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ;
|
{s,sp = appAdj' (regA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ;
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
DetCN det cn = {
|
DetCN det cn = {
|
||||||
s = \\c => <(det.s ! cn.g ! c).quant,
|
s = \\b,c => det.s ! b ! cn.g ! c ++ cn.s ! (adjfCase det.a c) ! det.n ! c ++ cn.adv ;
|
||||||
(det.s ! cn.g ! c).num ++ cn.s ! (adjfCase det.a c) ! det.n ! c ++ cn.adv> ;
|
|
||||||
a = agrgP3 cn.g det.n ;
|
a = agrgP3 cn.g det.n ;
|
||||||
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
||||||
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
||||||
@@ -24,7 +23,7 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNP det = { -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
DetNP det = { -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
||||||
s = \\c => <(det.sp ! Neutr ! c).quant, (det.sp ! Neutr ! c).num> ;
|
s = \\b,c => det.sp ! b ! Neutr ! c ;
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
-- isLight = det.isDef ;
|
-- isLight = det.isDef ;
|
||||||
-- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
-- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
||||||
@@ -33,14 +32,14 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN pn = {
|
UsePN pn = {
|
||||||
s = \\c => <[], pn.s ! c> ;
|
s = \\_,c => pn.s ! c ;
|
||||||
a = agrgP3 pn.g Sg ;
|
a = agrgP3 pn.g Sg ;
|
||||||
w = WLight' ; -- means: this is not a heavy NP, but comes before negation
|
w = WLight' ; -- means: this is not a heavy NP, but comes before negation
|
||||||
rc, ext = [] -- Pron => Light HL 6/2019: to regulate Pron/NonPronNP order
|
rc, ext = [] -- Pron => Light HL 6/2019: to regulate Pron/NonPronNP order
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePron pron = {
|
UsePron pron = {
|
||||||
s = \\c => <[], pron.s ! NPCase c> ;
|
s = \\_,c => pron.s ! NPCase c ;
|
||||||
a = pron.a ;
|
a = pron.a ;
|
||||||
w = WPron' ;
|
w = WPron' ;
|
||||||
rc, ext = []
|
rc, ext = []
|
||||||
@@ -48,28 +47,27 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
PredetNP pred np =
|
PredetNP pred np =
|
||||||
let ag = case pred.a of {PAg n => agrP3 n ; _ => np.a} in np ** {
|
let ag = case pred.a of {PAg n => agrP3 n ; _ => np.a} in np ** {
|
||||||
s = \\c0 =>
|
s = \\b,c0 =>
|
||||||
let c = case pred.c.k of {NoCase' => c0 ; PredCase' k => k} in
|
let c = case pred.c.k of {NoCase' => c0 ; PredCase' k => k} in
|
||||||
<pred.s ! numberAgr ag ! genderAgr np.a ! c0 ++ pred.c.p ++ (np.s ! c).p1, (np.s ! c).p2> ;
|
pred.s ! numberAgr ag ! genderAgr np.a ! c0 ++ pred.c.p ++ np.s ! b ! c ;
|
||||||
a = ag ;
|
a = ag ;
|
||||||
w = WHeavy'
|
w = WHeavy'
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PPartNP np v2 = np ** {
|
PPartNP np v2 = np ** {
|
||||||
s = incr2 np.s (embedInCommas (v2.s ! VPastPart APred)) ; --- invar part
|
s = \\b,c => np.s ! b ! c ++ (embedInCommas (v2.s ! VPastPart APred)) ; --- invar part
|
||||||
w = WHeavy'
|
w = WHeavy'
|
||||||
} ;
|
} ;
|
||||||
{- "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German?
|
-- SS: "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German?
|
||||||
HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen,"
|
-- HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen,"
|
||||||
-}
|
|
||||||
|
|
||||||
AdvNP np adv = np ** {
|
AdvNP np adv = np ** {
|
||||||
s = incr2 np.s adv.s ;
|
s = \\b,c => np.s ! b ! c ++ adv.s ;
|
||||||
w = WHeavy'
|
w = WHeavy'
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExtAdvNP np adv = np ** {
|
ExtAdvNP np adv = np ** {
|
||||||
s = incr2 np.s (embedInCommas adv.s) ;
|
s = \\b,c => np.s ! b ! c ++ (embedInCommas adv.s) ;
|
||||||
w = WHeavy'
|
w = WHeavy'
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -80,17 +78,17 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
-- But parsing "im warmen Meer" results in a
|
-- But parsing "im warmen Meer" results in a
|
||||||
-- PrepNP in_Prep (DetCN (DetQuant ? NumSg) (AdjCN ... ))
|
-- PrepNP in_Prep (DetCN (DetQuant ? NumSg) (AdjCN ... ))
|
||||||
-- because (DetQuant.s!g!c).quant is ignored, but the .num is part of (np.s!c).p2.
|
-- because (DetQuant.s!g!c).quant is ignored, but the .num is part of (np.s!c).p2.
|
||||||
-- To avoid the metavariable ?, we have to make Det.s and NP.s depend on t:PrepType = isPrep.
|
-- To avoid the metavariable ?, we have to made Det.s and NP.s depend on t:PrepType = isPrep.
|
||||||
|
|
||||||
DetQuantOrd quant num ord =
|
DetQuantOrd quant num ord =
|
||||||
let -- does not work, since here DefArt is combined with ord
|
let
|
||||||
n = num.n ; --
|
n = num.n ;
|
||||||
a = quant.a
|
a = quant.a
|
||||||
in {
|
in {
|
||||||
s = \\g,c => {quant = quant.s ! num.isNum ! n ! g ! c;
|
s = \\b,g,c => quant.s ! b ! num.isNum ! n ! g ! c ++ num.s!g!c ++
|
||||||
num = num.s!g!c ++ ord.s ! agrAdj g (adjfCase a c) n c} ;
|
ord.s ! agrAdj g (adjfCase a c) n c ;
|
||||||
sp = \\g,c => {quant = quant.sp ! num.isNum ! n ! g ! c;
|
sp = \\b,g,c => quant.sp ! b ! num.isNum ! n ! g ! c ++ num.s!g!c ++
|
||||||
num = num.s!g!c ++ ord.s ! agrAdj g (adjfCase quant.aPl c) n c} ;
|
ord.s ! agrAdj g (adjfCase quant.aPl c) n c ;
|
||||||
n = n ;
|
n = n ;
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
||||||
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
||||||
@@ -100,10 +98,11 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
DetQuant quant num =
|
DetQuant quant num =
|
||||||
let
|
let
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
a = quant.a
|
a = quant.a ;
|
||||||
|
b = andB quant.hasDefArt (case num.n of {Sg => True ; _ => False}) ;
|
||||||
in {
|
in {
|
||||||
s = \\g,c => {quant = quant.s ! num.isNum ! n ! g ! c ; num = num.s!g!c} ;
|
s = \\b,g,c => quant.s ! b ! num.isNum ! n ! g ! c ++ num.s ! g ! c ;
|
||||||
sp = \\g,c => {quant = quant.sp ! num.isNum ! n ! g ! c ; num = num.s!g!c} ;
|
sp = \\_,g,c => quant.sp ! False ! num.isNum ! n ! g ! c ++ num.s!g!c ;
|
||||||
-- HL: der+er,den+en ; der drei,den drei+en
|
-- HL: der+er,den+en ; der drei,den drei+en
|
||||||
n = n ;
|
n = n ;
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
||||||
@@ -112,8 +111,8 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
PossPron p = {
|
PossPron p = {
|
||||||
s = \\_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
s = \\_,_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
||||||
sp = \\_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
sp = \\_,_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
||||||
a = Strong ;
|
a = Strong ;
|
||||||
aPl = Weak ;
|
aPl = Weak ;
|
||||||
hasDefArt = False ;
|
hasDefArt = False ;
|
||||||
@@ -137,8 +136,9 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} ; -- drittbeste
|
OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} ; -- drittbeste
|
||||||
|
|
||||||
DefArt = {
|
DefArt = {
|
||||||
s = \\_,n,g,c => artDef ! (gennum g n) ! c ;
|
s = table{True => \\_,n,g,c => [] ; -- defart dropped
|
||||||
sp = \\_,n,g,c => case <n,c> of {
|
False => \\_,n,g,c => artDef ! (gennum g n) ! c} ;
|
||||||
|
sp = \\_,_,n,g,c => case <n,c> of {
|
||||||
<Pl,Dat> => "denen" ; -- HL 6/2019
|
<Pl,Dat> => "denen" ; -- HL 6/2019
|
||||||
<Pl,Gen> => "derer" ; -- HL 6/2019
|
<Pl,Gen> => "derer" ; -- HL 6/2019
|
||||||
_ => artDef ! (gennum g n) ! c } ;
|
_ => artDef ! (gennum g n) ! c } ;
|
||||||
@@ -146,14 +146,14 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
hasDefArt = True
|
hasDefArt = True
|
||||||
} ;
|
} ;
|
||||||
IndefArt = {
|
IndefArt = {
|
||||||
s = table {
|
s = \\_ => table {
|
||||||
True => \\_,_,c => [] ;
|
True => \\_,_,c => [] ;
|
||||||
False => table {
|
False => table {
|
||||||
Sg => \\g,c => "ein" + pronEnding ! GSg g ! c ;
|
Sg => \\g,c => "ein" + pronEnding ! GSg g ! c ;
|
||||||
Pl => \\_,c => []
|
Pl => \\_,c => []
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
sp = table {
|
sp = \\_ => table {
|
||||||
True => \\_,_,c => [] ;
|
True => \\_,_,c => [] ;
|
||||||
False => table {
|
False => table {
|
||||||
Sg => \\g,c => (detUnlikeAdj' False Sg "ein").s ! g ! c ;
|
Sg => \\g,c => (detUnlikeAdj' False Sg "ein").s ! g ! c ;
|
||||||
@@ -165,7 +165,7 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
MassNP cn = {
|
MassNP cn = {
|
||||||
s = \\c => <[], cn.s ! Strong ! Sg ! c ++ cn.adv> ;
|
s = \\_,c => cn.s ! Strong ! Sg ! c ++ cn.adv ;
|
||||||
a = agrgP3 cn.g Sg ;
|
a = agrgP3 cn.g Sg ;
|
||||||
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
||||||
-- isPron = False ;
|
-- isPron = False ;
|
||||||
@@ -231,33 +231,36 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
AdvCN cn a = cn ** {adv = cn.adv ++ a.s} ;
|
AdvCN cn a = cn ** {adv = cn.adv ++ a.s} ;
|
||||||
|
|
||||||
ApposCN cn np = let g = cn.g in cn ** {
|
ApposCN cn np = let g = cn.g in cn ** {
|
||||||
s = \\a,n,c => cn.s ! a ! n ! c ++ (np.s ! c).p1 ++ (np.s ! c).p2 ++ bigNP' np } ;
|
s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! False ! c ++ bigNP' np } ;
|
||||||
|
|
||||||
-- PossNP cn np = cn ** {
|
-- PossNP cn np = cn ** {
|
||||||
-- s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPP CVonDat ++ bigNP np } ;
|
-- s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPP CVonDat ++ bigNP np } ;
|
||||||
PossNP cn np = cn ** {
|
PossNP cn np = cn ** {
|
||||||
s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep2' vonDat' np.s ++ bigNP' np } ; -- HL, ad hoc
|
s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep' vonDat' (np.s ! False) ++ bigNP' np } ; -- HL, ad hoc
|
||||||
|
|
||||||
-- PartNP cn np = todo -- glass of wine
|
PartNP cn np = case np.w of {
|
||||||
|
WPron' => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep' vonDat' (np.s ! False) ++ np.rc} ;
|
||||||
|
_ => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! False ! Gen} -- HL 7/2022, ad hoc
|
||||||
|
}; -- glass of wine
|
||||||
|
|
||||||
CountNP det np = -- drei der Kinder | drei von den Kindern -- HL 7/22, ad-hoc
|
CountNP det np = -- drei der Kinder | drei von den Kindern -- HL 7/22, ad-hoc TODO
|
||||||
-- det or numeral? np or rather (DefArt +) cn? drei (einiger Kinder) ?
|
-- det or numeral? np or rather (DefArt +) cn? drei (einiger Kinder) ?
|
||||||
let g = genderAgr np.a
|
let g = genderAgr np.a
|
||||||
in {
|
in {
|
||||||
s = \\c => det.s ! g ! c ++ np.s ! NPP CVonDat ++ bigNP np ;
|
s = \\b,c => det.s ! b ! g ! c ++ appPrepNP' vonDat' np ++ bigNP' np ;
|
||||||
a = agrgP3 g det.n ;
|
a = agrgP3 g det.n ;
|
||||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
w = case det.isDef of { True => WLight' ; _ => WHeavy' } ;
|
||||||
rc = np.rc ;
|
rc = np.rc ;
|
||||||
ext = np.ext
|
ext = np.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- AdjDAP dap adj = ?? TODO -- the large (one)
|
AdjDAP dap ap = -- the large (one) -- HL 8/22 der auf dich stolze; die ihm treue; der so dumme, infzu
|
||||||
|
{s, sp = \\g,c => dap.s ! g ! c ++ ap.c.p1 ++ ap.c.p2 ++ ap.s ! (AMod (gennum g dap.n) c) ++ ap.ext ;
|
||||||
|
a = dap.a ; n = dap.n ; isDef = dap.isDef ; hasDefArt = dap.hasDefArt } ;
|
||||||
|
|
||||||
DetDAP det = {s = \\g,c => (det.s ! g ! c).quant ++ (det.s ! g ! c).num ; -- HL 7/22
|
DetDAP det = {s = \\g,c => det.s ! False ! g ! c ; -- HL 7/22 todo: check
|
||||||
sp = \\g,c => (det.sp ! g ! c).quant ++ (det.sp ! g ! c).num ;
|
sp = \\g,c => det.sp ! False ! g ! c ;
|
||||||
n = det.n ; a = det.a ; isDef = det.isDef ; hasDefArt = det.hasDefArt} ;
|
n = det.n ; a = det.a ; isDef = det.isDef ; hasDefArt = det.hasDefArt} ;
|
||||||
oper
|
|
||||||
incr2 : (Case => Str * Str) -> Str -> (Case => Str * Str) = \tab,str ->
|
|
||||||
\\c => <(tab ! c).p1, (tab ! c).p2 ++ str> ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ mkN : overload {
|
|||||||
-- for preposition glued with DefArt in singular:
|
-- for preposition glued with DefArt in singular:
|
||||||
-- e.g. "auf" "auf den" "auf die" "aufs" + accusative
|
-- e.g. "auf" "auf den" "auf die" "aufs" + accusative
|
||||||
mkPrep : Str -> Str -> Str -> Str-> Case -> Prep' ;
|
mkPrep : Str -> Str -> Str -> Str-> Case -> Prep' ;
|
||||||
|
mkPrep : Case -> Prep' ; -- convert case to preposition
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Often just a case with the empty string is enough.
|
-- Often just a case with the empty string is enough.
|
||||||
@@ -501,31 +502,30 @@ mkV2 : overload {
|
|||||||
mkAdv s = {s = s ; lock_Adv = <>} ;
|
mkAdv s = {s = s ; lock_Adv = <>} ;
|
||||||
|
|
||||||
mkPrep = overload {
|
mkPrep = overload {
|
||||||
mkPrep : Str -> Case -> Prep' = \s,c -> {s = s ; s2 = [] ; sg = \\_ => [] ;
|
mkPrep : Str -> Case -> Prep' = \s,c ->
|
||||||
c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
{s = \\_ => s ; s2 = [] ; c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
||||||
mkPrep : Case -> Str -> Prep' = \c,s -> {s = [] ; s2 = s ; sg = \\_ => [] ;
|
mkPrep : Case -> Str -> Prep' = \c,s ->
|
||||||
c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
{s = \\_ => [] ; s2 = s ; c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
||||||
mkPrep : Str -> Case -> Str -> Prep' = \s,c,t -> {s = s ; s2 = t ; sg = \\_ => [] ;
|
mkPrep : Str -> Case -> Str -> Prep' = \s,c,t ->
|
||||||
c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
{s = \\_ => s ; s2 = t ; c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
||||||
mkPrep : Str -> Str -> Str -> Str-> Case -> Prep' = \s,masc,fem,neutr, c ->
|
mkPrep : Str -> Str -> Str -> Str-> Case -> Prep' = \s,masc,fem,neutr, c ->
|
||||||
{s = s ; s2 = [] ; sg = table{Masc => masc ; Fem => fem ; Neutr => neutr} ;
|
{s = table{GPl => s ; GSg Masc => masc ; GSg Fem => fem ; GSg Neutr => neutr} ;
|
||||||
c = c ; isPrep = isPrepDefArt ; lock_Prep' = <>} ;
|
s2 = [] ; c = c ; isPrep = isPrepDefArt ; lock_Prep' = <>} ;
|
||||||
|
mkPrep : Case -> Prep' = \c ->
|
||||||
|
{s = \\_ => [] ; s2 = [] ; c = c ; isPrep = isCase ; lock_Prep' = <>} ;
|
||||||
} ;
|
} ;
|
||||||
accPrep = {s,s2 = [] ; sg = \\_ => [] ; c = accusative ; isPrep = isCase ; lock_Prep' = <>} ;
|
|
||||||
datPrep = {s,s2 = [] ; sg = \\_ => [] ; c = dative ; isPrep = isCase ; lock_Prep' = <>} ;
|
accPrep = mkPrep accusative ;
|
||||||
genPrep = {s,s2 = [] ; sg = \\_ => [] ; c = genitive ; isPrep = isCase ; lock_Prep' = <>} ;
|
datPrep = mkPrep dative ;
|
||||||
|
genPrep = mkPrep genitive ;
|
||||||
|
|
||||||
--von_Prep = mkPrep "von" dative ;
|
--von_Prep = mkPrep "von" dative ;
|
||||||
von_Prep = {s = "von"; s2=[]; sg = table{ Masc|Neutr => "vom" ; Fem => "von der" } ;
|
von_Prep = mkPrep "von" "vom" "von der" "vom" dative ;
|
||||||
c = dative ; isPrep = isPrepDefArt ; lock_Prep' = <>} ;
|
zu_Prep = mkPrep "zu" "zum" "zur" "zum" dative ;
|
||||||
zu_Prep = {s = "zu"; s2=[]; sg = table{ Masc|Neutr => "zum" ; Fem => "zur" } ;
|
inDat_Prep = mkPrep "in" "im" "in der" "im" dative ;
|
||||||
c = dative ; isPrep = isPrepDefArt ; lock_Prep' = <>} ;
|
inAcc_Prep = mkPrep "in" "in den" "in die" "ins" accusative ;
|
||||||
anDat_Prep = {s = "an"; s2=[]; sg = table{ Masc|Neutr => "am" ; Fem => "an der" } ;
|
anDat_Prep = mkPrep "an" "am" "an der" "am" dative ;
|
||||||
c = dative ; isPrep = isPrepDefArt ; lock_Prep' = <>} ;
|
anAcc_Prep = mkPrep "an" "an den" "an die" "ans" accusative ;
|
||||||
inDat_Prep = {s = "in"; s2=[]; sg = table{ Masc|Neutr => "im" ; Fem => "in der" } ;
|
|
||||||
c = dative ; isPrep = isPrepDefArt ; lock_Prep' = <>} ;
|
|
||||||
inAcc_Prep = {s = "in"; s2=[]; sg = table{ Masc => "in den" ; Fem => "in die" ; Neutr => "ins" } ;
|
|
||||||
c = dative ; isPrep = isPrepDefArt ; lock_Prep' = <>} ;
|
|
||||||
|
|
||||||
mk6V geben gibt gib gab gaebe gegeben =
|
mk6V geben gibt gib gab gaebe gegeben =
|
||||||
let
|
let
|
||||||
@@ -594,7 +594,7 @@ mkV2 : overload {
|
|||||||
= \v,c,d -> lin V3 (v ** {c2 = c ; c3 = d}) ;
|
= \v,c,d -> lin V3 (v ** {c2 = c ; c3 = d}) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
dirV3 v p = mkV3 v accPrep p ; -- accPrep sets isPrep=False
|
dirV3 v p = mkV3 v accPrep p ;
|
||||||
accdatV3 v = mkV3 v datPrep accPrep ; -- to fit to Eng ditransitives (no preposition):
|
accdatV3 v = mkV3 v datPrep accPrep ; -- to fit to Eng ditransitives (no preposition):
|
||||||
-- give sb(indir) sth(dir) = geben jmdm(dat) etwas(acc)
|
-- give sb(indir) sth(dir) = geben jmdm(dat) etwas(acc)
|
||||||
mkVS v = v ** {lock_VS = <>} ;
|
mkVS v = v ** {lock_VS = <>} ;
|
||||||
@@ -723,8 +723,7 @@ mkV2 : overload {
|
|||||||
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
|
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
|
||||||
mkV2 : V -> V2 = dirV2 ;
|
mkV2 : V -> V2 = dirV2 ;
|
||||||
mkV2 : V -> Prep' -> V2 = prepV2;
|
mkV2 : V -> Prep' -> V2 = prepV2;
|
||||||
mkV2 : V -> Case -> V2 = \v,c ->
|
mkV2 : V -> Case -> V2 = \v,c -> prepV2 v (mkPrep c) ;
|
||||||
prepV2 v (lin Prep' {s,s2 = [] ; sg = \\_ => [] ; c = c ; isPrep = isCase}) ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 ! Nom).p1 ++ (np.s ! Nom).p2 ++ bigNP' np} ;
|
UttNP np = {s = np.s ! False ! Nom ++ bigNP' np} ;
|
||||||
UttVP vp = {s = useInfVP True vp} ; -- without zu
|
UttVP vp = {s = useInfVP True vp} ; -- without zu
|
||||||
UttAdv adv = adv ;
|
UttAdv adv = adv ;
|
||||||
UttCN n = {s = n.s ! Strong ! Sg ! Nom ++ n.adv ++ n.ext ++ n.rc ! Sg} ;
|
UttCN n = {s = n.s ! Strong ! Sg ! Nom ++ n.adv ++ n.ext ++ n.rc ! Sg} ;
|
||||||
@@ -26,6 +26,6 @@ concrete PhraseGer of Phrase' = CatGer ** open Prelude, ResGer in {
|
|||||||
PConjConj conj = ss (conj.s2) ;
|
PConjConj conj = ss (conj.s2) ;
|
||||||
|
|
||||||
NoVoc = {s = []} ;
|
NoVoc = {s = []} ;
|
||||||
VocNP np = {s = "," ++ (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ bigNP' np} ;
|
VocNP np = {s = "," ++ np.s ! False ! Nom ++ bigNP' np} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ concrete QuestionGer of Question' = CatGer ** open ResGer in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
PrepIP p ip = {
|
PrepIP p ip = {
|
||||||
s = appPrep p (\\k => usePrepC k (\c -> ip.s ! c)) ;
|
s = appPrep' p ip.s ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvIP ip adv = {
|
AdvIP ip adv = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete RelativeGer of Relative' = CatGer ** open ResGer in {
|
concrete RelativeGer of Relative' = CatGer ** open Prelude, ResGer in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ concrete RelativeGer of Relative' = CatGer ** open ResGer in {
|
|||||||
|
|
||||||
FunRP p np rp = {
|
FunRP p np rp = {
|
||||||
-- s = \\gn,c => np.s ! NPC c ++ appPrep p (\\k => usePrepC k (\c -> rp.s ! gn ! c)) ;
|
-- s = \\gn,c => np.s ! NPC c ++ appPrep p (\\k => usePrepC k (\c -> rp.s ! gn ! c)) ;
|
||||||
s = \\gn,c => (np.s ! c).p1 ++ (np.s !c).p2 ++ appPrep' p (rp.s ! gn) ;
|
s = \\gn,c => np.s ! False ! c ++ appPrep' p (rp.s ! gn) ;
|
||||||
a = RAg (numberAgr np.a) (personAgr np.a)
|
a = RAg (numberAgr np.a) (personAgr np.a)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -39,27 +39,6 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
Agr = Ag Gender Number Person ;
|
Agr = Ag Gender Number Person ;
|
||||||
|
|
||||||
-- Case of $NP$ extended to deal with contractions like "zur", "im".
|
|
||||||
|
|
||||||
PCase = NPC Case | NPP CPrep ;
|
|
||||||
CPrep = CAnDat | CInAcc | CInDat | CZuDat | CVonDat ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
NPNom : PCase = NPC Nom ;
|
|
||||||
PrepNom : Preposition = {s,s2 = "" ; isPrep = False ; c = NPNom} ;
|
|
||||||
prepC : PCase -> {s : Str ; c : Case} = \cp -> case cp of {
|
|
||||||
NPC c => {s = [] ; c = c} ;
|
|
||||||
NPP CAnDat => {s = "an" ; c = Dat} ;
|
|
||||||
NPP CInAcc => {s = "in" ; c = Acc} ;
|
|
||||||
NPP CInDat => {s = "in" ; c = Dat} ;
|
|
||||||
NPP CZuDat => {s = "zu" ; c = Dat} ;
|
|
||||||
NPP CVonDat => {s = "von" ; c = Dat}
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
usePrepC : PCase -> (Case -> Str) -> Str = \c,fs ->
|
|
||||||
let sc = prepC c in sc.s ++ fs sc.c ;
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkAgr : {g : Gender ; n : Number ; p : Person} -> Agr = \r ->
|
mkAgr : {g : Gender ; n : Number ; p : Person} -> Agr = \r ->
|
||||||
Ag r.g r.n r.p ;
|
Ag r.g r.n r.p ;
|
||||||
@@ -73,35 +52,22 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
param NPForm = NPCase Case | NPPoss GenNum Case ;
|
param NPForm = NPCase Case | NPPoss GenNum Case ;
|
||||||
|
|
||||||
-- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich").
|
-- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich").
|
||||||
-- A number is sometimes inherited ("alle Menschen"),
|
-- A number is sometimes inherited ("alle Menschen"), sometimes forced ("jeder von
|
||||||
-- sometimes forced ("jeder von den Menschen").
|
-- den Menschen").
|
||||||
|
|
||||||
param
|
|
||||||
PredetCase = NoCase | PredCase PCase ;
|
|
||||||
PredetAgr = PAg Number | PAgNone ;
|
|
||||||
oper
|
|
||||||
noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ;
|
|
||||||
|
|
||||||
param
|
param
|
||||||
PredetCase' = NoCase' | PredCase' Case ;
|
PredetCase' = NoCase' | PredCase' Case ;
|
||||||
-- PredetAgr = PAg Number | PAgNone ;
|
PredetAgr = PAg Number | PAgNone ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
noCase' : {p : Str ; k : PredetCase'} = {p = [] ; k = NoCase'} ;
|
noCase' : {p : Str ; k : PredetCase'} = {p = [] ; k = NoCase'} ;
|
||||||
|
|
||||||
-- Pronominal nps are ordered differently, and light nps come before negation in clauses.
|
-- Pronominal nps are ordered differently, and light nps come before negation in clauses.
|
||||||
-- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19
|
-- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19
|
||||||
param
|
|
||||||
Weight = WPron | WLight | WHeavy ;
|
|
||||||
oper
|
|
||||||
isPron : {w : Weight} -> Bool = \np ->
|
|
||||||
case np.w of {WPron => True ; _ => False} ;
|
|
||||||
isLight : {w : Weight} -> Bool = \np ->
|
|
||||||
case np.w of {WHeavy => False ; _ => True} ;
|
|
||||||
|
|
||||||
-- To reduce c:PCase to c:Case in Preposition' and NP.s:PCase => Str to NP'.s:Case => Str*Str:
|
|
||||||
param
|
param
|
||||||
Weight' = WPron' | WLight' | WHeavy' | WDefArt ;
|
Weight' = WPron' | WLight' | WHeavy' | WDefArt ; -- HL: may need WIndefArt for nicht+ein => kein
|
||||||
oper
|
oper -- to handle clause negation properly
|
||||||
isPron' : {w : Weight'} -> Bool = \np ->
|
isPron' : {w : Weight'} -> Bool = \np ->
|
||||||
case np.w of {WPron' => True ; _ => False} ;
|
case np.w of {WPron' => True ; _ => False} ;
|
||||||
isLight' : {w : Weight'} -> Bool = \np ->
|
isLight' : {w : Weight'} -> Bool = \np ->
|
||||||
@@ -262,22 +228,12 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
g : Gender
|
g : Gender
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
NP : Type = {
|
NP' : Type = { -- HL 7/22: Bool = True if DefArt is dropped to combine with prep of type isPrepDefArt
|
||||||
s : PCase => Str ;
|
s : Bool => Case => Str ;
|
||||||
rc : Str ; -- die Frage , [rc die ich gestellt habe]
|
|
||||||
ext : Str ; -- die Frage , [sc wo sie schläft] ; die Regel , [vp kein Fleisch zu essen] | [s dass ...]
|
|
||||||
-- adv : Str ; -- die Frage [a von Max] -- HL: cannot be extracted
|
|
||||||
a : Agr ;
|
|
||||||
-- isLight : Bool ; -- light NPs come before negation in simple clauses (expensive)
|
|
||||||
-- isPron : Bool ; -- needed to put accPron before datPron
|
|
||||||
w : Weight } ;
|
|
||||||
|
|
||||||
NP' : Type = {
|
|
||||||
s : Case => Str * Str ;
|
|
||||||
rc : Str ; -- die Frage , [rc die ich gestellt habe]
|
rc : Str ; -- die Frage , [rc die ich gestellt habe]
|
||||||
ext : Str ; -- die Frage , [sc wo sie schläft] ; die Regel , [vp kein Fleisch zu essen] | [s dass ...]
|
ext : Str ; -- die Frage , [sc wo sie schläft] ; die Regel , [vp kein Fleisch zu essen] | [s dass ...]
|
||||||
a : Agr ;
|
a : Agr ;
|
||||||
w : Weight' } ;
|
w : Weight' } ; -- light NPs come before negation in simple clauses
|
||||||
|
|
||||||
mkN : (x1,_,_,_,_,x6,x7 : Str) -> Gender -> Noun =
|
mkN : (x1,_,_,_,_,x6,x7 : Str) -> Gender -> Noun =
|
||||||
\Mann, Mannen, Manne, Mannes, Maenner, Maennern, Mann_, g -> {
|
\Mann, Mannen, Manne, Mannes, Maenner, Maennern, Mann_, g -> {
|
||||||
@@ -441,94 +397,59 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
legte ("ge" + legt)
|
legte ("ge" + legt)
|
||||||
[] VHaben ;
|
[] VHaben ;
|
||||||
|
|
||||||
-- Prepositions for complements indicate the complement case.
|
-- Prepositions are of three types: (i) cases, (ii) pure pre-, post- and circum-positions,
|
||||||
|
-- and (iii) prepositions glued with definite article in singular (using s!(GSg g)).
|
||||||
|
-- Prepositions indicate the case of their complement noun phrase.
|
||||||
|
|
||||||
Preposition : Type = {s : Str ; s2 : Str ; c : PCase ; isPrep : Bool} ;
|
param
|
||||||
|
PrepType = isCase | isPrep | isPrepDefArt ;
|
||||||
|
|
||||||
-- HL 7/19: German has very few circumpositions: um (Gen) Willen, von (Adv) an|ab|aus
|
oper
|
||||||
-- ? bis (Adv) hin|her. So maybe we should skip s2 (and save readings with empty preps).
|
Preposition' : Type = {s : GenNum => Str ; s2:Str ; c : Case ; isPrep : PrepType} ;
|
||||||
|
|
||||||
|
isaCase : Preposition' -> Bool = \p -> case p.isPrep of {isCase => True ; _ => False} ;
|
||||||
|
isaPrep : Preposition' -> Bool = \p -> case p.isPrep of {isPrep => True ; _ => False} ;
|
||||||
|
isaPrepDefArt : Preposition' -> Bool = \p -> case p.isPrep of {isPrepDefArt => True ; _ => False} ;
|
||||||
|
|
||||||
-- To apply a preposition to a complement.
|
-- To apply a preposition to a complement.
|
||||||
|
|
||||||
appPrep : Preposition -> (PCase => Str) -> Str = \prep,arg ->
|
|
||||||
prep.s ++ arg ! prep.c ++ prep.s2 ;
|
|
||||||
|
|
||||||
appPrepNP : Preposition -> NP -> Str = \prep,np ->
|
|
||||||
prep.s ++ np.s ! prep.c ++ bigNP np ++ prep.s2 ;
|
|
||||||
-- revised appPrep for discontinuous NPs
|
|
||||||
|
|
||||||
bigNP : NP -> Str = \np -> np.ext ++ np.rc ;
|
|
||||||
bigNP' : NP' -> Str = \np -> np.ext ++ np.rc ;
|
|
||||||
|
|
||||||
-- To build a preposition from just a case. -- HL 9/19: no longer used in RGL
|
|
||||||
|
|
||||||
noPreposition : Case -> Preposition = \c ->
|
|
||||||
{s,s2 = [] ; c = NPC c ; isPrep = False} ;
|
|
||||||
noPreposition' : Case -> Preposition' = \c ->
|
|
||||||
{s,s2 = [] ; c = c ; isPrep = isCase ; sg = \\_ => []} ;
|
|
||||||
PrepNom' : Preposition' = {s,s2 = "" ; sg = \\_ => []; isPrep = isCase ; c = Nom} ;
|
|
||||||
|
|
||||||
-- New version of Prepositions to reduce c:PCase to c:Case.
|
|
||||||
|
|
||||||
param PrepType = isCase | isPrep | isPrepDefArt ;
|
|
||||||
oper
|
|
||||||
Preposition' : Type = {s : Str ; s2 : Str ; sg : Gender => Str;
|
|
||||||
c : Case ; isPrep : PrepType} ;
|
|
||||||
|
|
||||||
appPrep' : Preposition' -> (Case => Str) -> Str = \prep,arg ->
|
appPrep' : Preposition' -> (Case => Str) -> Str = \prep,arg ->
|
||||||
prep.s ++ arg ! prep.c ++ prep.s2 ; -- todo
|
prep.s ! GPl ++ arg ! prep.c ++ prep.s2 ;
|
||||||
appPrep2' : Preposition' -> (Case => Str * Str) -> Str = \prep,arg ->
|
|
||||||
let det : Str = (arg ! prep.c).p1 ;
|
|
||||||
cn : Str = (arg ! prep.c).p2 ;
|
|
||||||
in prep.s ++ det ++ cn ++ prep.s2 ;
|
|
||||||
|
|
||||||
appPrepNP' : Preposition' -> NP' -> Str = \prep,np ->
|
appPrepNP' : Preposition' -> NP' -> Str = \prep,np ->
|
||||||
let n = numberAgr np.a ;
|
let
|
||||||
g = genderAgr np.a ;
|
g = (genderAgr np.a) ;
|
||||||
w = np.w ;
|
n = (numberAgr np.a) ;
|
||||||
det = (np.s ! prep.c).p1 ;
|
glues = case <prep.isPrep,n> of {<isPrepDefArt,Sg> => True ; _ => False} ;
|
||||||
cn = (np.s ! prep.c).p2 ;
|
nps = np.s ! glues ! prep.c
|
||||||
in
|
in
|
||||||
case prep.isPrep of {
|
case <glues, np.w> of {
|
||||||
isCase => det ++ cn ++ np.ext ++ np.rc;
|
<True, WDefArt> => -- e.g. "zum Hof|zur Tür|zum Fenster herein"
|
||||||
isPrep => prep.s ++ det ++ cn ++ prep.s2 ++ np.ext ++ np.rc;
|
prep.s ! (GSg g) ++ nps ++ np.ext ++ prep.s2 ++ np.rc ;
|
||||||
isPrepDefArt => case <n,w> of {
|
_ => prep.s ! GPl ++ nps ++ np.ext ++ prep.s2 ++ np.rc
|
||||||
<Sg,WDefArt> => -- e.g. "zum Hof|zur Tür|zum Fenster herein"
|
} ;
|
||||||
prep.sg!g ++ cn ++ prep.s2 ++ np.ext ++ np.rc ;
|
|
||||||
_ =>
|
|
||||||
prep.s ++ det ++ cn ++ prep.s2 ++ np.ext ++ np.rc
|
|
||||||
} } ;
|
|
||||||
|
|
||||||
npM' : NP' = {s = table Case {Nom => <"der","Hund">; Acc => <"den","Hund">;
|
bigNP' : NP' -> Str = \np -> np.ext ++ np.rc ;
|
||||||
Dat => <"dem","Hund">; Gen => <"des","Hundes">};
|
|
||||||
rc = []; ext=[]; a = (Ag Masc Sg P3); w = WDefArt};
|
|
||||||
npN' : NP' = {s = table Case {Nom => <"das","Haus">; Acc => <"das","Haus">;
|
|
||||||
Dat => <"dem","Haus">; Gen => <"des","Hauses">};
|
|
||||||
rc = []; ext=[]; a = (Ag Neutr Sg P3); w = WDefArt};
|
|
||||||
npInDefM' : NP' = {s = table Case {Nom => <"ein","Hund">; Acc => <"einen","Hund">;
|
|
||||||
Dat => <"einem","Hund">; Gen => <"eines","Hundes">};
|
|
||||||
rc = []; ext=[]; a = (Ag Masc Sg P3); w = WLight'};
|
|
||||||
npInDefN' : NP' = {s = table Case {Nom => <"ein","Haus">; Acc => <"ein","Haus">;
|
|
||||||
Dat => <"einem","Haus">; Gen => <"eines","Hauses">};
|
|
||||||
rc = []; ext=[]; a = (Ag Neutr Sg P3); w = WLight'}; -- WHeavy' ?
|
|
||||||
npF' : NP' = {s = table Case {Nom => <"die","Frau">; Acc => <"die","Frau">;
|
|
||||||
Dat => <"der","Frau">; Gen => <"der","Frau">};
|
|
||||||
rc = []; ext=[]; a = (Ag Fem Sg P3); w = WDefArt};
|
|
||||||
|
|
||||||
Dat' : Preposition' = {s=""; s2=""; sg = \\c => []; c=Dat; isPrep=isCase} ;
|
-- To build a preposition from just a case. -- HL 9/19: moved to mkPrep in ParadigmsGer
|
||||||
mit' : Preposition' = {s="zusammen mit"; s2=""; sg = \\_ => []; c=Dat; isPrep=isPrep} ;
|
|
||||||
|
|
||||||
vonDat' : Preposition' = {s="von"; s2=""; sg = table{Fem => "von der"; _ => "vom"}; c=Dat; isPrep=isPrep} ;
|
PrepNom' : Preposition' = {s = \\_ => []; isPrep = isCase ; c = Nom ; s2 = []} ;
|
||||||
|
|
||||||
zuDat' : Preposition' = {s="zu"; s2="herein"; sg = \\_ => ""; c=Dat; isPrep=isPrep} ;
|
vonDat' : Preposition' = {s=table{GPl => "von" ; GSg Fem => "von der"; _ => "vom"};
|
||||||
zum' : Preposition' = {s="zu"; s2="herein"; sg = table{Masc=>"zum"; Fem=>"zur"; Neutr=>"zum"};
|
s2=[]; c=Dat; isPrep=isPrepDefArt} ;
|
||||||
c=Dat; isPrep=isPrepDefArt} ;
|
-- for testing:
|
||||||
inDat' : Preposition' = {s="in"; s2="drin"; sg = \\_ => ""; c=Dat; isPrep=isPrep} ;
|
Dat' : Preposition' = {s = \\_ => []; s2 = []; c=Dat; isPrep=isCase} ;
|
||||||
im' : Preposition' = {s="in"; s2="drin"; sg = table{Masc=>"im"; Fem=>"in der"; Neutr=>"im"};
|
mit' : Preposition' = {s = \\_ => "zusammen mit"; s2 = []; c=Dat; isPrep=isPrep} ;
|
||||||
c=Dat; isPrep=isPrepDefArt} ;
|
|
||||||
inAcc' : Preposition' = {s="in"; s2="hinein"; sg = \\_ => ""; c=Acc; isPrep=isPrep} ;
|
zuDat' : Preposition' = {s=\\_ => "zu"; s2="herein"; c=Dat; isPrep=isPrep} ;
|
||||||
ins' : Preposition' = {s="in"; s2="hinein"; sg = table{Masc=>"in den"; Fem=>"in die"; Neutr=>"ins"};
|
zum' : Preposition' = {s= table{GPl => "zu"; GSg Fem =>"zur"; _ => "zum"};
|
||||||
c=Acc; isPrep=isPrepDefArt} ;
|
s2="herein"; c=Dat; isPrep=isPrepDefArt} ;
|
||||||
|
inDat' : Preposition' = {s= \\_ => "in" ; s2="drin"; c=Dat; isPrep=isPrep} ;
|
||||||
|
im' : Preposition' = {s= table{GPl => "in"; GSg Fem=>"in der"; _ =>"im"};
|
||||||
|
s2="drin"; c=Dat; isPrep=isPrepDefArt} ;
|
||||||
|
inAcc' : Preposition' = {s=\\_ => "in"; s2="hinein"; c=Acc; isPrep=isPrep} ;
|
||||||
|
ins' : Preposition' = {s=table{GPl => "in"; GSg Masc=>"in den"; GSg Fem=>"in die"; GSg Neutr=>"ins"};
|
||||||
|
s2="hinein"; c=Acc; isPrep=isPrepDefArt} ;
|
||||||
|
|
||||||
-- Pronouns and articles
|
-- Pronouns and articles
|
||||||
-- Here we define personal and relative pronouns.
|
-- Here we define personal and relative pronouns.
|
||||||
@@ -565,6 +486,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
GPl => caselist "die" "die" "den" "der"
|
GPl => caselist "die" "die" "den" "der"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
{- -- used in SymbolGer:
|
||||||
artDefContr : GenNum -> PCase -> Str = \gn,np -> case np of {
|
artDefContr : GenNum -> PCase -> Str = \gn,np -> case np of {
|
||||||
NPC c => artDef ! gn ! c ;
|
NPC c => artDef ! gn ! c ;
|
||||||
NPP p => case <p,gn> of {
|
NPP p => case <p,gn> of {
|
||||||
@@ -578,22 +500,10 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
_ => let sp = prepC np in sp.s ++ artDef ! gn ! sp.c
|
_ => let sp = prepC np in sp.s ++ artDef ! gn ! sp.c
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
-}
|
||||||
|
|
||||||
-- This is used when forming determiners that are like adjectives.
|
-- This is used when forming determiners that are like adjectives.
|
||||||
|
|
||||||
appAdj : Adjective -> Number => Gender => PCase => Str = \adj ->
|
|
||||||
let
|
|
||||||
ad : GenNum -> Case -> Str = \gn,c ->
|
|
||||||
adj.s ! Posit ! AMod gn c
|
|
||||||
in
|
|
||||||
\\n,g,c => usePrepC c (\k -> case n of {
|
|
||||||
Sg => ad (GSg g) k ;
|
|
||||||
_ => ad GPl k
|
|
||||||
}) ;
|
|
||||||
|
|
||||||
-- HL: To reduce PCase to Case: todo: check if we can omit the prep-string of a PCase
|
|
||||||
-- perhaps needed for "am besten"? But the adj is used in Posit only
|
|
||||||
appAdj' : Adjective -> Number => Gender => Case => Str = \adj ->
|
appAdj' : Adjective -> Number => Gender => Case => Str = \adj ->
|
||||||
let
|
let
|
||||||
ad : GenNum -> Case -> Str = \gn,c ->
|
ad : GenNum -> Case -> Str = \gn,c ->
|
||||||
@@ -801,32 +711,6 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
||||||
insertObj obj vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl } ;
|
insertObj obj vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl } ;
|
||||||
|
|
||||||
insertObjNP : NP -> Preposition -> VPSlash -> VPSlash = \np,prep,vp ->
|
|
||||||
let c = case prep.c of { NPC cc => cc ; _ => Nom } ;
|
|
||||||
obj = appPrepNP prep np ;
|
|
||||||
in vp ** {
|
|
||||||
nn = \\a =>
|
|
||||||
let vpnn = vp.nn ! a in
|
|
||||||
-- HL 11/6/19: rough object NP order (expensive):
|
|
||||||
-- vfin < accPron < refl < (gen|dat)Pron < lightNP < neg < heavyNP|PP < vinf|comp
|
|
||||||
case <prep.isPrep, np.w, c> of { -- 2 * 3 * 4 = 24 cases
|
|
||||||
<True, _,_> => -- <prons, light, heavy++pp, compl>
|
|
||||||
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj, vpnn.p4> ;
|
|
||||||
<False,WPron, Acc> => -- <ihn ++ sich, light, heavy, comp>
|
|
||||||
<obj ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ;
|
|
||||||
<False,WPron, _ > => -- <sich ++ ihm|seiner, light, heavy, comp>
|
|
||||||
<vpnn.p1 ++ obj, vpnn.p2, vpnn.p3, vpnn.p4> ;
|
|
||||||
<False,WLight,Dat> => -- (assuming v.c2=acc) nonPron: dat < acc|gen
|
|
||||||
-- <prons, dat ++ np, heavy, comp>
|
|
||||||
<vpnn.p1, obj ++ vpnn.p2, vpnn.p3, vpnn.p4> ;
|
|
||||||
<False,WHeavy,Dat> => -- <prons, light, dat ++ np, comp>
|
|
||||||
<vpnn.p1, vpnn.p2, obj ++ vpnn.p3, vpnn.p4> ;
|
|
||||||
<False,WLight,_ > => -- <prons, np ++ gen|acc, heavy, comp>
|
|
||||||
<vpnn.p1, vpnn.p2 ++ obj, vpnn.p3, vpnn.p4> ;
|
|
||||||
<False,WHeavy,_ > => -- <prons, light, dat ++ np, comp>
|
|
||||||
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj, vpnn.p4> }
|
|
||||||
} ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4)
|
|
||||||
|
|
||||||
insertObjNP' : NP' -> Preposition' -> VPSlash -> VPSlash = \np,prep,vp ->
|
insertObjNP' : NP' -> Preposition' -> VPSlash -> VPSlash = \np,prep,vp ->
|
||||||
let c = prep.c ;
|
let c = prep.c ;
|
||||||
obj = appPrepNP' prep np ;
|
obj = appPrepNP' prep np ;
|
||||||
@@ -846,18 +730,18 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
<False,WLight',Dat> => -- (assuming v.c2=acc) nonPron: dat < acc|gen
|
<False,WLight',Dat> => -- (assuming v.c2=acc) nonPron: dat < acc|gen
|
||||||
-- <prons, dat ++ np, heavy, comp>
|
-- <prons, dat ++ np, heavy, comp>
|
||||||
<vpnn.p1, obj ++ vpnn.p2, vpnn.p3, vpnn.p4> ;
|
<vpnn.p1, obj ++ vpnn.p2, vpnn.p3, vpnn.p4> ;
|
||||||
<False,WHeavy'|WDefArt,Dat> => -- <prons, light, dat ++ np, comp>
|
|
||||||
<vpnn.p1, vpnn.p2, obj ++ vpnn.p3, vpnn.p4> ;
|
|
||||||
<False,WLight',_ > => -- <prons, np ++ gen|acc, heavy, comp>
|
<False,WLight',_ > => -- <prons, np ++ gen|acc, heavy, comp>
|
||||||
<vpnn.p1, vpnn.p2 ++ obj, vpnn.p3, vpnn.p4> ;
|
<vpnn.p1, vpnn.p2 ++ obj, vpnn.p3, vpnn.p4> ;
|
||||||
<False,WHeavy'|WDefArt,_ > => -- <prons, light, dat ++ np, comp>
|
-- <False,WHeavy'|WDefArt,Dat> => -- <prons, light, dat ++ np, comp>
|
||||||
|
-- <vpnn.p1, vpnn.p2, obj ++ vpnn.p3, vpnn.p4> ;
|
||||||
|
<False,WHeavy'|WDefArt,_ > => -- <prons, light, np ++ gen|acc, comp>
|
||||||
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj, vpnn.p4> }
|
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj, vpnn.p4> }
|
||||||
} ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4)
|
} ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4)
|
||||||
|
|
||||||
|
|
||||||
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
||||||
let prep = vp.c2 ; -- HL 7/22 reduced to c:Case
|
let prep = vp.c2 ; -- HL 7/22 reduced to c:Case
|
||||||
obj : Agr => Str = \\a => prep.s ++ reflPron ! a ! prep.c ++ prep.s2 ;
|
obj : Agr => Str = \\a => prep.s ! GPl ++ reflPron ! a ! prep.c ++ prep.s2 ;
|
||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
@@ -1099,11 +983,8 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
infPart : Bool -> Str = \b -> if_then_Str b [] "zu" ;
|
infPart : Bool -> Str = \b -> if_then_Str b [] "zu" ;
|
||||||
|
|
||||||
heavyNP :
|
|
||||||
{s : PCase => Str ; a : Agr} -> {s : PCase => Str ; a : Agr ; w : Weight ; ext,rc : Str} = \np ->
|
|
||||||
np ** {w = WHeavy ; ext,rc = []} ; -- this could be wrong
|
|
||||||
heavyNP' :
|
heavyNP' :
|
||||||
{s : Case => Str ; a : Agr} -> {s : Case => Str ; a : Agr ; w : Weight' ; ext,rc : Str} = \np ->
|
{s : Bool => Case => Str ; a : Agr} -> {s : Bool => Case => Str ; a : Agr ; w : Weight' ; ext,rc : Str} = \np ->
|
||||||
np ** {w = WHeavy' ; ext,rc = []} ; -- this could be wrong
|
np ** {w = WHeavy' ; ext,rc = []} ; -- this could be wrong
|
||||||
|
|
||||||
relPron : RelGenNum => Case => Str = \\rgn,c =>
|
relPron : RelGenNum => Case => Str = \\rgn,c =>
|
||||||
@@ -1120,11 +1001,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Function that allows the construction of non-nominative subjects.
|
-- Function that allows the construction of non-nominative subjects.
|
||||||
mkSubj : NP -> Preposition -> Str * Agr = \np, prep ->
|
|
||||||
let
|
|
||||||
agr = case prep.c of { NPC Nom => np.a ; _ => Ag Masc Sg P3 } ;
|
|
||||||
subj = appPrepNP prep np
|
|
||||||
in <subj , agr> ;
|
|
||||||
mkSubj' : NP' -> Preposition' -> Str * Agr = \np, prep ->
|
mkSubj' : NP' -> Preposition' -> Str * Agr = \np, prep ->
|
||||||
let
|
let
|
||||||
agr = case prep.c of { Nom => np.a ; _ => Ag Masc Sg P3 } ;
|
agr = case prep.c of { Nom => np.a ; _ => Ag Masc Sg P3 } ;
|
||||||
|
|||||||
@@ -45,10 +45,9 @@ concrete SentenceGer of Sentence' = CatGer ** open ResGer, Prelude in {
|
|||||||
SlashPrep cl prep = cl ** {c2 = prep} ;
|
SlashPrep cl prep = cl ** {c2 = prep} ;
|
||||||
|
|
||||||
SlashVS np vs slash =
|
SlashVS np vs slash =
|
||||||
let subj = mkSubj' np PrepNom'
|
let subj = mkSubj' np PrepNom' ;
|
||||||
in mkClause subj.p1 subj.p2
|
vp = (insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs))
|
||||||
(insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs)) **
|
in mkClause subj.p1 subj.p2 vp ** {c2 = slash.c2} ;
|
||||||
{c2 = slash.c2} ;
|
|
||||||
|
|
||||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ; -- no leading comma, if sentence-initial
|
EmbedS s = {s = conjThat ++ s.s ! Sub} ; -- no leading comma, if sentence-initial
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
here_Adv = ss "hier" ;
|
here_Adv = ss "hier" ;
|
||||||
how_IAdv = ss "wie" ;
|
how_IAdv = ss "wie" ;
|
||||||
how8much_IAdv = ss "wieviel" ;
|
how8much_IAdv = ss "wieviel" ;
|
||||||
how8many_IDet = {s = \\g,c => (detUnlikeAdj False Pl "wie viel").s ! g ! NPC c ; n = Pl} ;
|
how8many_IDet = {s = \\g,c => (detUnlikeAdj' False Pl "wie viel").s ! g ! c ; n = Pl} ;
|
||||||
if_Subj = ss "wenn" ; --- no variants in the RGL! | ss "falls" ;
|
if_Subj = ss "wenn" ; --- no variants in the RGL! | ss "falls" ;
|
||||||
in8front_Prep = mkPrep "vor" P.dative ;
|
in8front_Prep = mkPrep "vor" P.dative ;
|
||||||
i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ;
|
i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ;
|
||||||
@@ -77,9 +77,9 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
on_Prep = P.mkPrep "auf" "auf den" "auf die" "aufs" P.accusative ; -- test HL 7/2022
|
on_Prep = P.mkPrep "auf" "auf den" "auf die" "aufs" P.accusative ; -- test HL 7/2022
|
||||||
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
|
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
|
||||||
otherwise_PConj = ss "sonst" ;
|
otherwise_PConj = ss "sonst" ;
|
||||||
part_Prep = P.von_Prep ; -- mkPrep "von" P.dative ;
|
part_Prep = P.von_Prep ; -- obsolete, use PartNP cn np
|
||||||
please_Voc = ss "bitte" ;
|
please_Voc = ss "bitte" ;
|
||||||
possess_Prep = P.von_Prep ;-- mkPrep "von" P.dative ;
|
possess_Prep = P.von_Prep ; -- obsolete, use PossNP cn np
|
||||||
quite_Adv = ss "ziemlich" ;
|
quite_Adv = ss "ziemlich" ;
|
||||||
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
|
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
|
||||||
so_AdA = ss "so" ;
|
so_AdA = ss "so" ;
|
||||||
@@ -97,7 +97,7 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
somewhere_Adv = ss "irgendwo" ;
|
somewhere_Adv = ss "irgendwo" ;
|
||||||
that_Quant = let
|
that_Quant = let
|
||||||
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "jen").s in
|
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "jen").s in
|
||||||
{s,sp = \\_ => jener ; a,aPl = Weak ; hasDefArt = False} ;
|
{s,sp = \\_,_ => jener ; a,aPl = Weak ; hasDefArt = False} ;
|
||||||
---b that_NP = nameNounPhrase {s = caselist "das" "das" "denem" "dessen"} ; ----
|
---b that_NP = nameNounPhrase {s = caselist "das" "das" "denem" "dessen"} ; ----
|
||||||
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
||||||
there7to_Adv = ss "dahin" ;
|
there7to_Adv = ss "dahin" ;
|
||||||
@@ -107,7 +107,7 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
||||||
this_Quant = let
|
this_Quant = let
|
||||||
dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "dies").s in
|
dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "dies").s in
|
||||||
{s,sp = \\_ => dieser ; a,aPl = Weak ; hasDefArt = False} ;
|
{s,sp = \\_,_ => dieser ; a,aPl = Weak ; hasDefArt = False} ;
|
||||||
---b this_NP = nameNounPhrase {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
---b this_NP = nameNounPhrase {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
||||||
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
||||||
through_Prep = mkPrep "durch" P.accusative ;
|
through_Prep = mkPrep "durch" P.accusative ;
|
||||||
@@ -148,7 +148,7 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
Pl => (detUnlikeAdj' False Pl "kein").s
|
Pl => (detUnlikeAdj' False Pl "kein").s
|
||||||
}
|
}
|
||||||
in
|
in
|
||||||
{s,sp = \\_ => keiner ; a = Strong ; aPl = Weak ; hasDefArt = False} ; ---- sp
|
{s,sp = \\_,_ => keiner ; a = Strong ; aPl = Weak ; hasDefArt = False} ; ---- sp
|
||||||
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
||||||
nobody_NP =
|
nobody_NP =
|
||||||
nameNounPhrase' Masc {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ;
|
nameNounPhrase' Masc {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ;
|
||||||
@@ -165,8 +165,8 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
lin language_title_Utt = ss "Deutsch" ;
|
lin language_title_Utt = ss "Deutsch" ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
asQuant : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
asQuant : (Gender => Case => Str) -> (Bool => Gender => Case => Str) =
|
||||||
\tab -> \\g,c => {quant = tab ! g ! c; num = []} ;
|
\tab -> \\_,g,c => tab ! g ! c ;
|
||||||
asNum : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
asNum : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
||||||
\tab -> \\g,c => {quant = []; num = tab ! g ! c} ;
|
\tab -> \\g,c => {quant = []; num = tab ! g ! c} ;
|
||||||
pairTable : (Gender => Case => Str) -> (Gender => Case => Str) -> (Gender => Case => {quant,num:Str})
|
pairTable : (Gender => Case => Str) -> (Gender => Case => Str) -> (Gender => Case => {quant,num:Str})
|
||||||
|
|||||||
@@ -26,12 +26,11 @@ lin
|
|||||||
ext,rc = [] -- added
|
ext,rc = [] -- added
|
||||||
} ;
|
} ;
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
s = \\c => artDefContr (GSg cn.g) c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! (prepC c).c ;
|
-- s = \\c => artDefContr (GSg cn.g) c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ;
|
||||||
|
s = \\c => artDef (GSg cn.g) c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ;
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
-- isPron = False ;
|
|
||||||
-- isLight = True ;
|
|
||||||
w = WLight ;
|
w = WLight ;
|
||||||
ext,rc = [] -- added
|
ext,rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SymbS sy = {s = \\_ => sy.s} ;
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|||||||
@@ -94,11 +94,12 @@ concrete VerbGer of Verb' = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
|
|
||||||
-- SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
-- SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
||||||
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
||||||
{-
|
|
||||||
|
-- without: 205539 msec
|
||||||
-- to save (571098 = 83669 = 487429 msec) compile time (in 58% memory), comment out:
|
-- to save (571098 = 83669 = 487429 msec) compile time (in 58% memory), comment out:
|
||||||
SlashV2VNP' v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
-- SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
||||||
insertObjNP' np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
-- insertObjNP' np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
||||||
-}
|
|
||||||
UseComp comp =
|
UseComp comp =
|
||||||
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
||||||
-- adj slot not used here for e.g. "ich bin alt" but same behaviour as NPs?
|
-- adj slot not used here for e.g. "ich bin alt" but same behaviour as NPs?
|
||||||
@@ -107,7 +108,7 @@ concrete VerbGer of Verb' = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
UseCopula = predV sein_V ;
|
UseCopula = predV sein_V ;
|
||||||
|
|
||||||
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
||||||
CompNP np = {s = \\_ => (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ np.rc ; ext = np.ext} ;
|
CompNP np = {s = \\_ => np.s ! False ! Nom ++ np.rc ; ext = np.ext} ;
|
||||||
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
||||||
|
|
||||||
CompCN cn = {s = \\a => case numberAgr a of {
|
CompCN cn = {s = \\a => case numberAgr a of {
|
||||||
|
|||||||
Reference in New Issue
Block a user