mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Fin) Update all functions that use CN to use postmod field
This commit is contained in:
@@ -48,7 +48,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
|
||||
|
||||
-- The $Bool$ tells if a possessive suffix is attached, which affects the case.
|
||||
|
||||
CN = {s : NForm => Str ; h : Harmony ; postmod : Number => Str} ;
|
||||
CN = LinCN ; -- {s : NForm => Str ; h : Harmony ; postmod : Number => Str} ;
|
||||
Pron = {s : NPForm => Str ; a : Agr ; hasPoss : Bool ; poss : Str} ;
|
||||
NP = {s : NPForm => Str ; a : Agr ; isPron : Bool ; isNeg : Bool} ;
|
||||
DAP, Det = {
|
||||
@@ -101,6 +101,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
|
||||
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;
|
||||
ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s.p1 ;
|
||||
NP = \np -> np.s ! NPAcc ; ----NPSep ;
|
||||
CN = cnRef ;
|
||||
|
||||
VP = vpRef ;
|
||||
VPSlash = \vps -> vpRef vps ++ vps.c2.s.p1 ;
|
||||
@@ -115,5 +116,5 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
|
||||
|
||||
oper
|
||||
vpRef : StemFin.VP -> Str = \vp -> infVP SCNom Pos (agrP3 Sg) vp Inf1 ;
|
||||
|
||||
cnRef : LinCN -> Str = linCN (NCase Sg Nom) ;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ concrete ConjunctionFin of Conjunction =
|
||||
BaseCN x y = twoTable NForm (mergeCN x) (mergeCN y) ; -- put postmod in s field
|
||||
ConsCN x xs = consrTable NForm comma (mergeCN x) xs;
|
||||
oper
|
||||
LinCN : Type = {s : NForm => Str ; h : Harmony ; postmod : Number => Str} ;
|
||||
-- RS, SC and Adv are in separate fields, to prevent "lasi viiniänsa" for "lasinsa viiniä".
|
||||
-- But for coordination, we just give up and attach the postmod.
|
||||
-- Really, if you want to have "lasinsa viiniä ja kuppinsa teetä", just use ConjNP instead.
|
||||
|
||||
@@ -27,7 +27,9 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
||||
} ;
|
||||
|
||||
GenRP num cn = {
|
||||
s = \\n,c => let k = npform2case num.n c in relPron ! n ! Gen ++ cn.s ! NCase num.n k ;
|
||||
s = \\n,c =>
|
||||
let k = npform2case num.n c
|
||||
in relPron ! n ! Gen ++ linCN (NCase num.n k) cn ;
|
||||
a = RNoAg
|
||||
--- a = RAg (agrP3 num.n)
|
||||
} ;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete MarkupFin of Markup = CatFin, MarkHTMLX ** {
|
||||
concrete MarkupFin of Markup = CatFin, MarkHTMLX ** open ResFin in {
|
||||
|
||||
lin
|
||||
MarkupCN m cn = cn ** {s = \\nf => appMark m (cn.s ! nf)} ;
|
||||
MarkupCN m cn = cn ** {s = \\nf => appMark m (linCN nf cn)} ;
|
||||
MarkupNP m np = np ** {s = \\c => appMark m (np.s ! c)} ;
|
||||
MarkupAP m ap = ap ** {s = \\b,nf => appMark m (ap.s ! b ! nf)} ;
|
||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||
|
||||
@@ -14,7 +14,7 @@ concrete PhraseFin of Phrase = CatFin ** open ResFin, StemFin, (P = Prelude) in
|
||||
UttNP np = {s = addNegation np.isNeg ++ np.s ! NPSep} ;
|
||||
UttVP vp = {s = addNegation vp.vptyp.isNeg ++ infVP SCNom Pos (agrP3 Sg) vp Inf1} ;
|
||||
UttAdv adv = adv ;
|
||||
UttCN np = {s = np.s ! NCase Sg Nom} ;
|
||||
UttCN cn = {s = cnRef cn} ;
|
||||
UttAP np = {s = np.s ! P.False ! NCase Sg Nom} ;
|
||||
UttCard n = {s = n.s ! Sg ! Nom} ;
|
||||
UttInterj i = i ;
|
||||
|
||||
@@ -60,7 +60,7 @@ concrete QuestionFin of Question = CatFin ** open ResFin, StemFin, Prelude in {
|
||||
_ => NCase n k -- mitkä kytkimet
|
||||
}
|
||||
in
|
||||
idet.s ! k ++ cn.s ! ncase ;
|
||||
idet.s ! k ++ linCN ncase cn ;
|
||||
n = n
|
||||
} ;
|
||||
|
||||
|
||||
@@ -55,6 +55,18 @@ oper
|
||||
_ => SCNom
|
||||
} ;
|
||||
|
||||
LinCN : Type = {s : NForm => Str ; h : Harmony ; postmod : Number => Str} ;
|
||||
linCN : NForm -> LinCN -> Str = \nf,cn ->
|
||||
let n : Number = case nf of {
|
||||
NCase n _ => n ;
|
||||
NPossNom n => n ;
|
||||
NPossGen n => n ;
|
||||
NPossIllat n => n ;
|
||||
NPossTransl n => n ;
|
||||
_ => Sg
|
||||
} ;
|
||||
in cn.s ! nf ++ cn.postmod ! n ;
|
||||
|
||||
-- Agreement of $NP$ has number*person and the polite second ("te olette valmis").
|
||||
|
||||
param
|
||||
|
||||
@@ -121,7 +121,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
|
||||
Sg => Nom ; -- minä olen iso ; te olette iso
|
||||
Pl => Part -- me olemme isoja ; te olette isoja
|
||||
} --- definiteness of NP ?
|
||||
in cn.s ! (NCase n c)
|
||||
in linCN (NCase n c) cn ;
|
||||
} ;
|
||||
CompNP np = {s = \\_ => np.s ! NPSep} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
|
||||
Reference in New Issue
Block a user