forked from GitHub/gf-rgl
merge of the manual and automatic grammars
This commit is contained in:
@@ -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 ;
|
||||
|
||||
Reference in New Issue
Block a user