forked from GitHub/gf-rgl
(Som) Add Predets
This commit is contained in:
@@ -62,7 +62,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
NP = ResSom.NounPhrase ;
|
NP = ResSom.NounPhrase ;
|
||||||
Pron = ResSom.Pronoun ; --Pronouns need enough info to turn it into NP or Quant.
|
Pron = ResSom.Pronoun ; --Pronouns need enough info to turn it into NP or Quant.
|
||||||
Det = ResSom.Determiner ;
|
Det = ResSom.Determiner ;
|
||||||
Predet = {s : Str} ;
|
Predet = {s : Str ; da : DefArticle ; isPoss : Bool} ;
|
||||||
Quant = ResSom.Quant ;
|
Quant = ResSom.Quant ;
|
||||||
Num = ResSom.Num ;
|
Num = ResSom.Num ;
|
||||||
Ord = {s : Str ; n : Number} ;
|
Ord = {s : Str ; n : Number} ;
|
||||||
|
|||||||
@@ -57,8 +57,17 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
UsePron pron = pron ** {st = Definite} ;
|
UsePron pron = pron ** {st = Definite} ;
|
||||||
|
|
||||||
-- : Predet -> NP -> NP ; -- only the man
|
-- : Predet -> NP -> NP ; -- only the man
|
||||||
PredetNP predet np = np ** {
|
PredetNP predet np =
|
||||||
s = \\c => predet.s ++ np.s ! c ---- ?
|
let qnt = PossPron (pronTable ! np.a) ;
|
||||||
|
det = qnt.shortPoss ! predet.da ;
|
||||||
|
predetS : Str = case predet.isPoss of {
|
||||||
|
True => glue predet.s det ;
|
||||||
|
False => predet.s
|
||||||
|
} ;
|
||||||
|
in np ** {s = \\c =>
|
||||||
|
case <np.isPron,predet.isPoss> of {
|
||||||
|
<True,True> => np.empty ++ predetS ;
|
||||||
|
_ => np.s ! c ++ predetS}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,11 @@ lin or_Conj = {s2 = \\_ => "ama" ; s1 = [] ; n = Sg} ; -- mise with interrogativ
|
|||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
-- *Det and Quant
|
-- *Det and Quant
|
||||||
{-
|
|
||||||
lin how8many_IDet = R.indefDet "" pl ;
|
|
||||||
|
|
||||||
lin all_Predet = { s = "" } ;
|
--lin how8many_IDet = R.indefDet "" pl ;
|
||||||
|
|
||||||
|
lin all_Predet = {s = "giddi" ; isPoss = True ; da = M GA} ;
|
||||||
|
{-
|
||||||
lin not_Predet = { s = "" } ;
|
lin not_Predet = { s = "" } ;
|
||||||
lin only_Predet = { s = "" } ;
|
lin only_Predet = { s = "" } ;
|
||||||
lin most_Predet = { s = "" } ;
|
lin most_Predet = { s = "" } ;
|
||||||
|
|||||||
Reference in New Issue
Block a user