1
0
forked from GitHub/gf-rgl

merge of the manual and automatic grammars

This commit is contained in:
Krasimir Angelov
2025-11-06 11:47:31 +01:00
parent 066d6f9c85
commit 6b93e87363
14 changed files with 13140 additions and 482 deletions

View File

@@ -9,7 +9,10 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in {
-- : Det -> CN -> NP
DetCN det cn = emptyNP ** {
art = det.s ! cn.g ;
s = \\c => cn.s ! getNForm det.dt c ;
s = \\c => case det.dt of {
DDef n sp => cn.s ! c ! sp ! n ;
DPoss n _ => cn.s ! c ! Def ! n -- ????????????????
} ;
a = NotPron det.dt ;
} ;
@@ -20,7 +23,7 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in {
-- : Pron -> NP ;
-- Assuming that lincat Pron = lincat NP
UsePron pron = emptyNP ** pron ** {
s = \\c => pron.s ! npc2cc c ;
s = pron.s ;
a = IsPron pron.a
} ;
{-
@@ -58,7 +61,7 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in {
-}
-- MassNP : CN -> NP ;
MassNP cn = emptyNP ** {
s = \\c => cn.s ! getNForm (DDef Sg Indefinite) c -- no article, singular indefinite forms, open for cases+mutations
s = \\c => cn.s ! c ! Indef ! Sg -- no article, singular indefinite forms, open for cases+mutations
} ;
@@ -132,16 +135,23 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in {
DefArt = ResGla.defArt ;
-- : Quant
IndefArt = mkQuant [] (QDef Indefinite) ;
IndefArt = {
s = \\_ => [] ;
sp = [] ;
qt = QDef Indef ;
} ;
-- : Pron -> Quant -- my
PossPron pron = mkQuant pron.poss (QPoss pron.a) ;
PossPron pron = {
s = \\_ => pron.poss ;
sp = pron.poss ;
qt = QPoss pron.a ;
} ;
--2 Common nouns
-- : N -> CN
UseN = useN ;
UseN n = n ;
{-
-- : N2 -> CN ;