remove the m field from NP

This commit is contained in:
Krasimir Angelov
2026-10-02 20:15:10 +02:00
parent ea2fb317c5
commit ff4b654f7a
8 changed files with 30 additions and 37 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ concrete CatCze of Cat =
-- Modifiers restore full forms. s and prep are always available for strong use. -- Modifiers restore full forms. s and prep are always available for strong use.
-- m controls NP modifiers; a controls the clause. Scale nouns can differ. -- m controls NP modifiers; a controls the clause. Scale nouns can differ.
-- A modified pronoun can keep its pronominal head without a weak form. -- A modified pronoun can keep its pronominal head without a weak form.
NP = NPForms ** {clit : Case => Str ; a : Agr ; m : ModifierAgr ; hasClit,isDrop,isPron : Bool} ; NP = NPForms ** {clit : Case => Str ; a : Agr ; hasClit,isDrop,isPron : Bool} ;
PN = {s : Case => Str ; g : Gender} ; PN = {s : Case => Str ; g : Gender} ;
Ord = Adjective ; Ord = Adjective ;
Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize
+1 -1
View File
@@ -5,7 +5,7 @@ concrete ConjunctionCze of Conjunction = CatCze **
[Adv] = {s1,s2 : Str} ; [Adv] = {s1,s2 : Str} ;
[CN] = {s1,s2 : Number => Case => Str ; g,gPl : Gender} ; [CN] = {s1,s2 : Number => Case => Str ; g,gPl : Gender} ;
[AP] = {s1,s2 : Gender => Number => Case => Str ; pred1,pred2 : Agr => Str ; isPost : Bool} ; [AP] = {s1,s2 : Gender => Number => Case => Str ; pred1,pred2 : Agr => Str ; isPost : Bool} ;
[NP] = {s1,s2,prep1,prep2 : Case => Str ; a : Agr ; m : ModifierAgr} ; [NP] = {s1,s2,prep1,prep2 : Case => Str ; a : Agr} ;
[S] = {s1 : Sentence ; s2 : Str} ; [S] = {s1 : Sentence ; s2 : Str} ;
[RS] = {s1,s2 : Agr => Str} ; [RS] = {s1,s2 : Agr => Str} ;
+7 -9
View File
@@ -70,7 +70,7 @@ lincat
RNPList = {s1,s2,prep1,prep2 : Agr => Case => Str ; m : RNPHead} ; RNPList = {s1,s2,prep1,prep2 : Agr => Case => Str ; m : RNPHead} ;
param param
RNPHead = AntecedentHead | FixedHead ModifierAgr ; RNPHead = AntecedentHead | FixedHead Agr ;
lin lin
MkVPS temp pol vp = {s = \\a => MkVPS temp pol vp = {s = \\a =>
@@ -188,7 +188,7 @@ lin
(\\c => predetForm pred (rnpAgr rnp.m a) c) (rnpForms rnp a)) ; (\\c => predetForm pred (rnpAgr rnp.m a) c) (rnpForms rnp a)) ;
AdvRNP np p rnp = boundNPForms (\\a => AdvRNP np p rnp = boundNPForms (\\a =>
appendNPForms np (fullComplement p (rnp.s ! a) (rnp.prep ! a))) ** { appendNPForms np (fullComplement p (rnp.s ! a) (rnp.prep ! a))) ** {
m = FixedHead np.m ; isPron = np.isPron m = FixedHead np.a ; isPron = np.isPron
} ; } ;
AdvRVP vp p rnp = vp ** { AdvRVP vp p rnp = vp ** {
compl = \\a => vp.compl ! a ++ fullComplement p (rnp.s ! a) (rnp.prep ! a) compl = \\a => vp.compl ! a ++ fullComplement p (rnp.s ! a) (rnp.prep ! a)
@@ -213,7 +213,7 @@ oper
let forms : Case => Str = \\c => dap.s ! g ! c ; let forms : Case => Str = \\c => dap.s ! g ! c ;
agr = numeralAgr g dap P3 in agr = numeralAgr g dap P3 in
lin NP (npForms forms forms ** { lin NP (npForms forms forms ** {
clit = forms ; a = agr ; m = numeralModAgr g dap ; clit = forms ; a = agr ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
}) ; }) ;
@@ -233,15 +233,13 @@ oper
} ; } ;
-- Ordinary NPs and possessed heads have their own modifier agreement. -- Ordinary NPs and possessed heads have their own modifier agreement.
fullRNP : S.NP -> RNP = \np -> lin RNP (boundNPForms (\\_ => np) ** { fullRNP : S.NP -> RNP = \np -> lin RNP (boundNPForms (\\_ => np) ** {
m = FixedHead np.m ; isPron = np.isPron m = FixedHead np.a ; isPron = np.isPron
}) ; }) ;
-- A reflexive inherits gender and number, but its own complement position -- A reflexive inherits gender and number, but its own complement position
-- selects case: pět dětí miluje sebe všechny, not sebe všech. -- selects case: pět dětí miluje sebe všechny, not sebe všech.
rnpAgr : RNPHead -> Agr -> ModifierAgr = \head,a -> case head of { rnpAgr : RNPHead -> Agr -> Agr = \head,a -> case head of {
AntecedentHead => case a of { AntecedentHead => a ;
AgQuant g => Mod g Pl ; _ => modifierAgr a FixedHead a => a
} ;
FixedHead m => m
} ; } ;
-- As for ordinary NPs, preposed modifiers agree with the first conjunct. -- As for ordinary NPs, preposed modifiers agree with the first conjunct.
baseRNP : RNP -> RNP -> RNPList = \x,y -> lin RNPList { baseRNP : RNP -> RNP -> RNPList = \x,y -> lin RNPList {
+6 -6
View File
@@ -5,33 +5,33 @@ concrete NamesCze of Names = CatCze ** open ResCze, Prelude in {
lin lin
GivenName name = GivenName name =
npForms (\\_ => name.s) (\\_ => name.s) ** { npForms (\\_ => name.s) (\\_ => name.s) ** {
clit = \\_ => name.s ; a = Ag (Masc Anim) Sg P3 ; m = Mod (Masc Anim) Sg ; clit = \\_ => name.s ; a = Ag (Masc Anim) Sg P3 ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; } ;
MaleSurname name = MaleSurname name =
npForms (\\_ => name.s) (\\_ => name.s) ** { npForms (\\_ => name.s) (\\_ => name.s) ** {
clit = \\_ => name.s ; a = Ag (Masc Anim) Sg P3 ; m = Mod (Masc Anim) Sg ; clit = \\_ => name.s ; a = Ag (Masc Anim) Sg P3 ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; } ;
FemaleSurname name = FemaleSurname name =
npForms (\\_ => name.s) (\\_ => name.s) ** { npForms (\\_ => name.s) (\\_ => name.s) ** {
clit = \\_ => name.s ; a = Ag Fem Sg P3 ; m = Mod Fem Sg ; clit = \\_ => name.s ; a = Ag Fem Sg P3 ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; } ;
PlSurname name = PlSurname name =
npForms (\\_ => name.s) (\\_ => name.s) ** { npForms (\\_ => name.s) (\\_ => name.s) ** {
clit = \\_ => name.s ; a = Ag (Masc Anim) Pl P3 ; m = Mod (Masc Anim) Pl ; clit = \\_ => name.s ; a = Ag (Masc Anim) Pl P3 ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; } ;
FullName name surname = FullName name surname =
npForms (\\_ => name.s ++ surname.s) (\\_ => name.s ++ surname.s) ** { npForms (\\_ => name.s ++ surname.s) (\\_ => name.s ++ surname.s) ** {
clit = \\_ => name.s ++ surname.s ; clit = \\_ => name.s ++ surname.s ;
a = Ag (Masc Anim) Sg P3 ; m = Mod (Masc Anim) Sg ; a = Ag (Masc Anim) Sg P3 ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; } ;
UseLN name = UseLN name =
npForms (\\_ => name.s) (\\_ => name.s) ** { npForms (\\_ => name.s) (\\_ => name.s) ** {
clit = \\_ => name.s ; a = Ag Neutr Sg P3 ; m = Mod Neutr Sg ; clit = \\_ => name.s ; a = Ag Neutr Sg P3 ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; } ;
PlainLN = UseLN ; PlainLN = UseLN ;
+6 -6
View File
@@ -18,7 +18,7 @@ lin
MassNP cn = MassNP cn =
let s = cn.s ! Sg in npForms s s ** { let s = cn.s ! Sg in npForms s s ** {
clit = s ; clit = s ;
a = Ag cn.g Sg P3 ; m = Mod cn.g Sg ; isPron = False ; a = Ag cn.g Sg P3 ; isPron = False ;
hasClit = False ; isDrop = False ; hasClit = False ; isDrop = False ;
} ; } ;
@@ -65,7 +65,7 @@ lin
Loc => pron.loc ; Loc => pron.loc ;
Ins => pron.ins Ins => pron.ins
} ; } ;
a = pron.a ; m = modifierAgr pron.a ; a = pron.a ;
hasClit = True ; isDrop = pron.isDrop ; isPron = True ; hasClit = True ; isDrop = pron.isDrop ; isPron = True ;
} ; } ;
@@ -73,7 +73,7 @@ lin
UsePN pn = npForms pn.s pn.s ** { UsePN pn = npForms pn.s pn.s ** {
clit = pn.s ; clit = pn.s ;
a = Ag pn.g Sg P3 ; m = Mod pn.g Sg ; isPron = False ; a = Ag pn.g Sg P3 ; isPron = False ;
hasClit = False ; isDrop = False ; hasClit = False ; isDrop = False ;
} ; } ;
@@ -130,7 +130,7 @@ lin
let forms : Case => Str = \\c => det.s ! Neutr ! c ++ np.s ! Gen ; let forms : Case => Str = \\c => det.s ! Neutr ! c ++ np.s ! Gen ;
agr = numeralAgr Neutr det P3 in agr = numeralAgr Neutr det P3 in
npForms forms forms ** { npForms forms forms ** {
clit = forms ; a = agr ; m = Mod Neutr Pl ; clit = forms ; a = agr ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; } ;
@@ -149,7 +149,7 @@ lin
QuantityNP decimal unit = QuantityNP decimal unit =
let forms : Case => Str = \\_ => decimal.s ++ unit.s in let forms : Case => Str = \\_ => decimal.s ++ unit.s in
npForms forms forms ** { npForms forms forms ** {
clit = forms ; a = AgQuant Neutr ; m = Mod Neutr Pl ; clit = forms ; a = AgQuant Neutr ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; } ;
@@ -167,7 +167,7 @@ lin
PredetNP pred np = PredetNP pred np =
let forms = predetNPForms (andB pred.postPron np.isPron) let forms = predetNPForms (andB pred.postPron np.isPron)
(\\c => predetForm pred np.m c) np (\\c => predetForm pred np.a c) np
in np ** forms ** { in np ** forms ** {
-- A predeterminer modifies a full NP: jen já, jen jeho. Its scope -- A predeterminer modifies a full NP: jen já, jen jeho. Its scope
-- cannot be preserved by an omitted subject or an object clitic. -- cannot be preserved by an omitted subject or an object clitic.
+7 -12
View File
@@ -1367,8 +1367,6 @@ param
-- Nested scales retain the outer head: tato dvě stě tisíc korun. -- Nested scales retain the outer head: tato dvě stě tisíc korun.
ScaleAgreement = QuantifiedScale | NominalScale ; ScaleAgreement = QuantifiedScale | NominalScale ;
NumHead = CountedHead | ScaleHead Gender NumSize ScaleAgreement ; NumHead = CountedHead | ScaleHead Gender NumSize ScaleAgreement ;
-- NP modifiers have gender/number/case agreement, never verbal person.
ModifierAgr = Mod Gender Number | ModQuant Gender ;
oper oper
quantifierForm : Adjective -> Determiner -> Gender -> Case -> Str = \q,num,g,c -> quantifierForm : Adjective -> Determiner -> Gender -> Case -> Str = \q,num,g,c ->
@@ -1383,18 +1381,15 @@ oper
-- Predeterminers agree with the NP head, including a quantified head in -- Predeterminers agree with the NP head, including a quantified head in
-- the genitive. This differs from clause agreement for e.g. tisíc korun. -- the genitive. This differs from clause agreement for e.g. tisíc korun.
numeralModAgr : Gender -> Determiner -> ModifierAgr = \g,num -> case num.head of { numeralModAgr : Gender -> Determiner -> Agr = \g,num -> case num.head of {
CountedHead => modifierAgr (numSizeAgr g num.size P3) ; CountedHead => numSizeAgr g num.size P3 ;
ScaleHead sg size _ => modifierAgr (numSizeAgr sg size P3) ScaleHead sg size _ => numSizeAgr sg size P3
} ; } ;
modifierAgr : Agr -> ModifierAgr = \a -> case a of { predetForm : Adjective -> Agr -> Case -> Str = \pred,a,c -> case a of {
Ag g n _ => Mod g n ; AgPol g => Mod g Sg ; AgQuant g => ModQuant g Ag g n _ => pred.s ! g ! n ! c ;
} ; AgPol g => pred.s ! g ! Sg ! c ;
AgQuant g => pred.s ! g ! Pl ! countCase Num5 c
predetForm : Adjective -> ModifierAgr -> Case -> Str = \pred,a,c -> case a of {
Mod g n => pred.s ! g ! n ! c ;
ModQuant g => pred.s ! g ! Pl ! countCase Num5 c
} ; } ;
-- Keep the boundary for my všichni doma, also after AdvNP. Complete forms -- Keep the boundary for my všichni doma, also after AdvNP. Complete forms
+1 -1
View File
@@ -75,7 +75,7 @@ lin
AdvImp adv imp = {s = \\pos,a => adv.s ++ imp.s ! pos ! a} ; AdvImp adv imp = {s = \\pos,a => adv.s ++ imp.s ! pos ! a} ;
PredSCVP sc vp = PredVP PredSCVP sc vp = PredVP
(npForms (\\_ => sc.s) (\\_ => sc.s) ** { (npForms (\\_ => sc.s) (\\_ => sc.s) ** {
clit = \\_ => sc.s ; a = Ag Neutr Sg P3 ; m = Mod Neutr Sg ; clit = \\_ => sc.s ; a = Ag Neutr Sg P3 ;
hasClit = False ; isDrop = False ; isPron = False}) vp ; hasClit = False ; isDrop = False ; isPron = False}) vp ;
EmbedS s = {s = (frontSentence "že" s).s} ; EmbedS s = {s = (frontSentence "že" s).s} ;
EmbedQS qs = {s = qs.ind} ; EmbedQS qs = {s = qs.ind} ;
+1 -1
View File
@@ -56,7 +56,7 @@ lin
somePl_Det = regNumeral "několik" "několika" ; -- CEG 6.8 ---- somePl_Det = regNumeral "několik" "několika" ; -- CEG 6.8 ----
something_NP = something_NP =
let s : Case => Str = \\c => "ně" + coForms ! c in npForms s s ** { let s : Case => Str = \\c => "ně" + coForms ! c in npForms s s ** {
clit = s ; a = Ag Neutr Sg P3 ; m = Mod Neutr Sg ; clit = s ; a = Ag Neutr Sg P3 ;
hasClit = False ; isDrop = False ; isPron = False hasClit = False ; isDrop = False ; isPron = False
} ; -- CEG 5.6.3 } ; -- CEG 5.6.3
possess_Prep = mkPrep Gen ; possess_Prep = mkPrep Gen ;