forked from GitHub/gf-rgl
@@ -6,7 +6,7 @@ concrete ExtendAra of Extend =
|
|||||||
EmptyRelSlash, PredAPVP,
|
EmptyRelSlash, PredAPVP,
|
||||||
ComplDirectVS, ComplDirectVQ, -- because of Utt
|
ComplDirectVS, ComplDirectVQ, -- because of Utt
|
||||||
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
|
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
|
||||||
EmbedSSlash
|
EmbedSSlash, AdjAsNP
|
||||||
]
|
]
|
||||||
with (Grammar=GrammarAra)
|
with (Grammar=GrammarAra)
|
||||||
** open
|
** open
|
||||||
@@ -43,6 +43,15 @@ lin
|
|||||||
DetNPMasc det = emptyNP ** {s = det.s ! NoHum ! Masc} ;
|
DetNPMasc det = emptyNP ** {s = det.s ! NoHum ! Masc} ;
|
||||||
DetNPFem det = emptyNP ** {s = det.s ! NoHum ! Fem} ;
|
DetNPFem det = emptyNP ** {s = det.s ! NoHum ! Fem} ;
|
||||||
|
|
||||||
|
-- : AP -> NP
|
||||||
|
AdjAsNP ap =
|
||||||
|
let adjAsN : Noun = {
|
||||||
|
s = ap.s ! NoHum ! Masc ;
|
||||||
|
s2 = emptyNTable ;
|
||||||
|
g = Masc ;
|
||||||
|
h = NoHum ;
|
||||||
|
isDual = False } ;
|
||||||
|
in MassNP (UseN adjAsN) ;
|
||||||
|
|
||||||
-- : ClSlash -> RCl -- he lives in
|
-- : ClSlash -> RCl -- he lives in
|
||||||
EmptyRelSlash = RelSlash (IdRP ** {s = \\_ => []}) ;
|
EmptyRelSlash = RelSlash (IdRP ** {s = \\_ => []}) ;
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ oper
|
|||||||
--------------------
|
--------------------
|
||||||
BaseQuant : Type = {
|
BaseQuant : Type = {
|
||||||
mod : Mod ;
|
mod : Mod ;
|
||||||
isNeg : Bool
|
isNeg : Bool ;
|
||||||
|
isDef : Bool
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Determiner : Type = BaseQuant ** {
|
Determiner : Type = BaseQuant ** {
|
||||||
@@ -146,13 +147,13 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
Quant : Type = BaseQuant ** {
|
Quant : Type = BaseQuant ** {
|
||||||
s : Number => CmpdStatus => Str ;
|
s : Number => CmpdStatus => Str} ;
|
||||||
isDef : Bool } ;
|
|
||||||
|
|
||||||
makeDet : Str -> Number -> (isNum, isNeg : Bool) -> Determiner = \str,n,isNum,isNeg -> {
|
makeDet : Str -> Number -> (isNum, isNeg : Bool) -> Determiner = \str,n,isNum,isNeg -> {
|
||||||
s,sp = str;
|
s,sp = str;
|
||||||
isNum = isNum;
|
isNum = isNum ;
|
||||||
isNeg = isNeg ;
|
isNeg = isNeg ;
|
||||||
|
isDef = True ;
|
||||||
mod = Bare ;
|
mod = Bare ;
|
||||||
n = n
|
n = n
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
Clitic => detStr ++ cn.s ! num ! Clitic ++ cn.compl ! det.n ; -- In RGL this is only for no_Quant. If other determiners with different word order take Clitic, will change. /IL
|
Clitic => detStr ++ cn.s ! num ! Clitic ++ cn.compl ! det.n ; -- In RGL this is only for no_Quant. If other determiners with different word order take Clitic, will change. /IL
|
||||||
x => cn.s ! num ! x ++ detStr ++ cn.compl ! det.n } ; -- Ezafe or Poss: comes after noun, Mod table is overwritten to the given form
|
x => cn.s ! num ! x ++ detStr ++ cn.compl ! det.n } ; -- Ezafe or Poss: comes after noun, Mod table is overwritten to the given form
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
|
takesYeAsComp = False ; -- TODO: some rule with det.isDef and cn.hasAdj
|
||||||
isNeg = det.isNeg ; -- affects polarity in Cl: "*nothing is real" -> "nothing isn't real"
|
isNeg = det.isNeg ; -- affects polarity in Cl: "*nothing is real" -> "nothing isn't real"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -111,6 +112,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
MassNP cn = emptyNP ** cn ** {
|
MassNP cn = emptyNP ** cn ** {
|
||||||
s = \\m => cn.s ! Sg ! m ++ cn.compl ! Sg ;
|
s = \\m => cn.s ! Sg ! m ++ cn.compl ! Sg ;
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
|
takesYeAsComp = cn.hasAdj ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseN,
|
UseN,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ resource ResPes = MorphoPes ** open Prelude,Predef in {
|
|||||||
BaseNP : Type = {
|
BaseNP : Type = {
|
||||||
a : Agr ;
|
a : Agr ;
|
||||||
isNeg : Bool ; -- negative determiner forces negation in Cl and S
|
isNeg : Bool ; -- negative determiner forces negation in Cl and S
|
||||||
hasAdj : Bool ; -- to get the right form when NP is a predicate
|
takesYeAsComp : Bool ; -- to get the right form when NP is a predicate
|
||||||
animacy : Animacy ; -- to get the right pronoun in FunRP
|
animacy : Animacy ; -- to get the right pronoun in FunRP
|
||||||
isClitic : Bool ; -- if isPron, becomes clitic as a direct object
|
isClitic : Bool ; -- if isPron, becomes clitic as a direct object
|
||||||
clitic : Str ;
|
clitic : Str ;
|
||||||
@@ -44,7 +44,7 @@ resource ResPes = MorphoPes ** open Prelude,Predef in {
|
|||||||
s = \\_ => [] ;
|
s = \\_ => [] ;
|
||||||
a = defaultAgr ;
|
a = defaultAgr ;
|
||||||
isNeg = False ;
|
isNeg = False ;
|
||||||
hasAdj = False ;
|
takesYeAsComp = False ;
|
||||||
animacy = Inanimate ;
|
animacy = Inanimate ;
|
||||||
isClitic = False ;
|
isClitic = False ;
|
||||||
clitic = [] ;
|
clitic = [] ;
|
||||||
@@ -207,7 +207,10 @@ oper
|
|||||||
case <np.isClitic,vp.c2.isPrep> of {
|
case <np.isClitic,vp.c2.isPrep> of {
|
||||||
<True,False> => [] ; -- clitic is attached to the verb or prefix
|
<True,False> => [] ; -- clitic is attached to the verb or prefix
|
||||||
<True,True> => appCompVP vp.c2 (\\_ => BIND ++ np.clitic) ! wo ++ vp.comp ! a ! wo ;
|
<True,True> => appCompVP vp.c2 (\\_ => BIND ++ np.clitic) ! wo ++ vp.comp ! a ! wo ;
|
||||||
_ => appCompVP vp.c2 np.s ! wo ++ vp.comp ! a ! wo
|
_ => let nps : Mod=>Str = np.s ;
|
||||||
|
-- case np.takesYeAsComp of { True => replaceBare Clitic np.s ; -- TODO: later make a better rule, related to definiteness, when NP takes a clitic.
|
||||||
|
-- _ => np.s } ;
|
||||||
|
in appCompVP vp.c2 nps ! wo ++ vp.comp ! a ! wo
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
s = case <np.isClitic,vp.c2.isPrep> of {
|
s = case <np.isClitic,vp.c2.isPrep> of {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
CompNP np = {
|
CompNP np = {
|
||||||
s = \\a => np.s ! case np.hasAdj of {
|
s = \\a => np.s ! case np.takesYeAsComp of {
|
||||||
False => Bare ;
|
False => Bare ;
|
||||||
True => Clitic }
|
True => Clitic }
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user