forked from GitHub/gf-rgl
Merge branch 'master' into new-rus-rg
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.
|
-- 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} ;
|
Pron = {s : NPForm => Str ; a : Agr ; hasPoss : Bool ; poss : Str} ;
|
||||||
NP = {s : NPForm => Str ; a : Agr ; isPron : Bool ; isNeg : Bool} ;
|
NP = {s : NPForm => Str ; a : Agr ; isPron : Bool ; isNeg : Bool} ;
|
||||||
DAP, Det = {
|
DAP, Det = {
|
||||||
@@ -101,6 +101,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
|
|||||||
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;
|
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;
|
||||||
ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s.p1 ;
|
ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s.p1 ;
|
||||||
NP = \np -> np.s ! NPAcc ; ----NPSep ;
|
NP = \np -> np.s ! NPAcc ; ----NPSep ;
|
||||||
|
CN = cnRef ;
|
||||||
|
|
||||||
VP = vpRef ;
|
VP = vpRef ;
|
||||||
VPSlash = \vps -> vpRef vps ++ vps.c2.s.p1 ;
|
VPSlash = \vps -> vpRef vps ++ vps.c2.s.p1 ;
|
||||||
@@ -115,5 +116,5 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
vpRef : StemFin.VP -> Str = \vp -> infVP SCNom Pos (agrP3 Sg) vp Inf1 ;
|
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
|
BaseCN x y = twoTable NForm (mergeCN x) (mergeCN y) ; -- put postmod in s field
|
||||||
ConsCN x xs = consrTable NForm comma (mergeCN x) xs;
|
ConsCN x xs = consrTable NForm comma (mergeCN x) xs;
|
||||||
oper
|
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ä".
|
-- 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.
|
-- 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.
|
-- 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 = {
|
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 = RNoAg
|
||||||
--- a = RAg (agrP3 num.n)
|
--- a = RAg (agrP3 num.n)
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
concrete MarkupFin of Markup = CatFin, MarkHTMLX ** {
|
concrete MarkupFin of Markup = CatFin, MarkHTMLX ** open ResFin in {
|
||||||
|
|
||||||
lin
|
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)} ;
|
MarkupNP m np = np ** {s = \\c => appMark m (np.s ! c)} ;
|
||||||
MarkupAP m ap = ap ** {s = \\b,nf => appMark m (ap.s ! b ! nf)} ;
|
MarkupAP m ap = ap ** {s = \\b,nf => appMark m (ap.s ! b ! nf)} ;
|
||||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||||
|
|||||||
@@ -126,6 +126,11 @@ oper
|
|||||||
mkN : V -> N ; -- verbal noun: "tekeminen"
|
mkN : V -> N ; -- verbal noun: "tekeminen"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- Verban nouns of type "tekeminen"
|
||||||
|
|
||||||
|
verbalN : V -> N -- tekeminen
|
||||||
|
= \v -> mkN (v.s ! (Inf Inf4Nom)) ;
|
||||||
|
|
||||||
-- Some nouns are regular except for the singular nominative (e.g. "mies").
|
-- Some nouns are regular except for the singular nominative (e.g. "mies").
|
||||||
|
|
||||||
exceptNomN : N -> Str -> N ;
|
exceptNomN : N -> Str -> N ;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ concrete PhraseFin of Phrase = CatFin ** open ResFin, StemFin, (P = Prelude) in
|
|||||||
UttNP np = {s = addNegation np.isNeg ++ np.s ! NPSep} ;
|
UttNP np = {s = addNegation np.isNeg ++ np.s ! NPSep} ;
|
||||||
UttVP vp = {s = addNegation vp.vptyp.isNeg ++ infVP SCNom Pos (agrP3 Sg) vp Inf1} ;
|
UttVP vp = {s = addNegation vp.vptyp.isNeg ++ infVP SCNom Pos (agrP3 Sg) vp Inf1} ;
|
||||||
UttAdv adv = adv ;
|
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} ;
|
UttAP np = {s = np.s ! P.False ! NCase Sg Nom} ;
|
||||||
UttCard n = {s = n.s ! Sg ! Nom} ;
|
UttCard n = {s = n.s ! Sg ! Nom} ;
|
||||||
UttInterj i = i ;
|
UttInterj i = i ;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ concrete QuestionFin of Question = CatFin ** open ResFin, StemFin, Prelude in {
|
|||||||
_ => NCase n k -- mitkä kytkimet
|
_ => NCase n k -- mitkä kytkimet
|
||||||
}
|
}
|
||||||
in
|
in
|
||||||
idet.s ! k ++ cn.s ! ncase ;
|
idet.s ! k ++ linCN ncase cn ;
|
||||||
n = n
|
n = n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,18 @@ oper
|
|||||||
_ => SCNom
|
_ => 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").
|
-- Agreement of $NP$ has number*person and the polite second ("te olette valmis").
|
||||||
|
|
||||||
param
|
param
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ lin
|
|||||||
nounHeading n = ss ((snoun2nounSep n).s ! NCase Sg Nom) ;
|
nounHeading n = ss ((snoun2nounSep n).s ! NCase Sg Nom) ;
|
||||||
nounPluralHeading n = ss ((snoun2nounSep n).s ! NCase Pl Nom) ;
|
nounPluralHeading n = ss ((snoun2nounSep n).s ! NCase Pl Nom) ;
|
||||||
|
|
||||||
formGF_N = mkN "muoto" ;
|
formGr_N = mkN "muoto" ;
|
||||||
exampleGr_N = mkN "esimerkki" ;
|
exampleGr_N = mkN "esimerkki" ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
|
|||||||
Sg => Nom ; -- minä olen iso ; te olette iso
|
Sg => Nom ; -- minä olen iso ; te olette iso
|
||||||
Pl => Part -- me olemme isoja ; te olette isoja
|
Pl => Part -- me olemme isoja ; te olette isoja
|
||||||
} --- definiteness of NP ?
|
} --- definiteness of NP ?
|
||||||
in cn.s ! (NCase n c)
|
in linCN (NCase n c) cn ;
|
||||||
} ;
|
} ;
|
||||||
CompNP np = {s = \\_ => np.s ! NPSep} ;
|
CompNP np = {s = \\_ => np.s ! NPSep} ;
|
||||||
CompAdv a = {s = \\_ => a.s} ;
|
CompAdv a = {s = \\_ => a.s} ;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user