forked from GitHub/gf-rgl
(Kor) Relative clauses
This commit is contained in:
@@ -18,8 +18,8 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
||||
IsDig => glue dets cn.c.s ;
|
||||
NoNum => dets } ;
|
||||
in case isNum det of {
|
||||
True => cns ++ detnum ;
|
||||
False => detnum ++ cns }
|
||||
True => cn.rs ++ cns ++ detnum ;
|
||||
False => cn.rs ++ detnum ++ cns }
|
||||
} ;
|
||||
|
||||
-- : PN -> NP ;
|
||||
@@ -159,8 +159,9 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
||||
} ;
|
||||
|
||||
-- : CN -> RS -> CN ;
|
||||
-- RelCN cn rs = cn ** {
|
||||
-- } ;
|
||||
RelCN cn rs = cn ** {
|
||||
rs = rs.s
|
||||
} ;
|
||||
|
||||
{-
|
||||
-- : CN -> Adv -> CN ;
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
concrete RelativeKor of Relative = CatKor ** open
|
||||
ResKor, Prelude, (NS=NounKor), (SS=StructuralKor) in {
|
||||
|
||||
{-
|
||||
lin
|
||||
-- : Cl -> RCl ; -- such that John loves her
|
||||
-- RelCl cl = ;
|
||||
RelCl cl = {s = \\t,a,p => cl.s ! t ! a ! p ! Subord} ;
|
||||
|
||||
-- : RP -> VP -> RCl ;
|
||||
RelVP rp vp =
|
||||
RelVP rp vp = {
|
||||
s = \\t,a,p => vp.s ! VAttr p -- TODO no tenses yet in the grammar
|
||||
++ rp.s ;
|
||||
} ;
|
||||
|
||||
-- : RP -> ClSlash -> RCl ; -- whom John loves
|
||||
RelSlash rp cls =
|
||||
RelSlash rp cls = {
|
||||
s = \\t,a,p => cls.s ! t ! a ! p ! Subord
|
||||
++ rp.s ;
|
||||
} ;
|
||||
|
||||
-- : RP ;
|
||||
IdRP = {s = ""} ;
|
||||
|
||||
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||
--FunRP prep np rp = {} ;
|
||||
-}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ oper
|
||||
Noun3 : Type = Noun ;
|
||||
|
||||
CNoun : Type = Noun ** {
|
||||
rs : Str ; -- Relative clause comes before determiner
|
||||
} ;
|
||||
|
||||
PNoun : Type = Noun ;
|
||||
@@ -32,7 +33,9 @@ oper
|
||||
c = baseCounter
|
||||
} ;
|
||||
|
||||
useN : Noun -> CNoun = \n -> n ;
|
||||
useN : Noun -> CNoun = \n -> n ** {
|
||||
rs = []
|
||||
} ;
|
||||
|
||||
---------------------------------------------
|
||||
-- NP
|
||||
@@ -309,7 +312,7 @@ oper
|
||||
|
||||
QClause : Type = Clause ;
|
||||
|
||||
RClause : Type = {s : NForm => Tense => Anteriority => Polarity => Str} ;
|
||||
RClause : Type = {s : Tense => Anteriority => Polarity => Str} ;
|
||||
|
||||
Sentence : Type = {s : ClType => Str} ;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ lin
|
||||
UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! Statement} ;
|
||||
|
||||
-- : Temp -> Pol -> RCl -> RS ;
|
||||
-- UseRCl t p cl = {s = } ;
|
||||
UseRCl t p rcl = {s = t.s ++ p.s ++ rcl.s ! t.t ! t.a ! p.p} ;
|
||||
|
||||
-- AdvS : Adv -> S -> S ; -- then I will go home
|
||||
AdvS = advS "" ;
|
||||
|
||||
Reference in New Issue
Block a user