mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
@@ -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} ;
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ lin name_N = mkN "magac" ;
|
|||||||
-- lin paris_PN = mkPN "Paris" ;
|
-- lin paris_PN = mkPN "Paris" ;
|
||||||
-- lin peace_N = mkN "" ;
|
-- lin peace_N = mkN "" ;
|
||||||
-- lin pen_N = mkN "" ;
|
-- lin pen_N = mkN "" ;
|
||||||
-- lin person_N = mkN "" ;
|
lin person_N = mkNoun "dad" "dadka" "dad" "dadka" Masc ;
|
||||||
-- lin planet_N = mkN "" ;
|
-- lin planet_N = mkN "" ;
|
||||||
-- lin plastic_N = mkN "" ;
|
-- lin plastic_N = mkN "" ;
|
||||||
-- lin play_V = mkV "" ;
|
-- lin play_V = mkV "" ;
|
||||||
|
|||||||
@@ -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}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -182,6 +182,18 @@ oper
|
|||||||
sp : Case => Str ;
|
sp : Case => Str ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
{- Saeed p.115: "This combination of possessive and article [kay-ga, tay-da]
|
||||||
|
is the basic form but possessives occur with the full range of determiners,
|
||||||
|
with associated meanings, for example:
|
||||||
|
remote article kii/tii: gurigaagii 'your house (remote)'
|
||||||
|
demonstrative kaas/taas: gurigaagaas 'that house of yours'
|
||||||
|
interrogative kee/tee: gurigaagee? 'which house of yours?'"
|
||||||
|
|
||||||
|
Since RGL abstract syntax doesn't allow combining two Quants, the way to go is
|
||||||
|
to have another Pron -> Quant function in Extra, which forms Quants such as
|
||||||
|
-gaagii, -gaagaas, -gaagee.
|
||||||
|
-}
|
||||||
|
|
||||||
pronTable : Agreement => Pronoun = table {
|
pronTable : Agreement => Pronoun = table {
|
||||||
Sg1 => {
|
Sg1 => {
|
||||||
s = table {Nom => "aan" ; Abs => "i"} ;
|
s = table {Nom => "aan" ; Abs => "i"} ;
|
||||||
@@ -288,7 +300,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
Numeral : Type = BaseNum ** {
|
Numeral : Type = BaseNum ** {
|
||||||
ord : Str -- whether to choose Numerative as the value of NForm
|
ord : Str
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
baseQuant : BaseQuant = {
|
baseQuant : BaseQuant = {
|
||||||
|
|||||||
@@ -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 = "" } ;
|
||||||
@@ -64,11 +65,30 @@ lin every_Det = R.defDet [] pl **
|
|||||||
lin few_Det = R.indefDet "" pl ;
|
lin few_Det = R.indefDet "" pl ;
|
||||||
lin many_Det = R.indefDet "" pl ;
|
lin many_Det = R.indefDet "" pl ;
|
||||||
lin much_Det = R.indefDet "" sg ;
|
lin much_Det = R.indefDet "" sg ;
|
||||||
lin somePl_Det = R.indefDet "" pl ;
|
|
||||||
lin someSg_Det = R.indefDet "" sg ;
|
|
||||||
|
|
||||||
lin no_Quant = mkPrep no_Quant
|
|
||||||
-}
|
-}
|
||||||
|
lin somePl_Det = {
|
||||||
|
s = \\x,_ => BIND ++ defStems ! x ++ BIND ++ "a qaarkood" ;
|
||||||
|
shortPoss = \\x => BIND ++ defStems ! x ++ BIND ++ "a qaarkood" ;
|
||||||
|
sp = \\_,_ => "qaarkood" ;
|
||||||
|
isPoss, isNum = False ;
|
||||||
|
n = Pl ;
|
||||||
|
st = Definite -- NB. Indefinite is really only reserved for IndefArt NumSg.
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin someSg_Det = somePl_Det ** {
|
||||||
|
n = Sg ;
|
||||||
|
s = table {
|
||||||
|
M x => \\_ => BIND ++ defStems ! M x ++ BIND ++ "a qaarkiis" ;
|
||||||
|
F x => \\_ => BIND ++ defStems ! F x ++ BIND ++ "a qaarkeed" } ;
|
||||||
|
shortPoss = table {
|
||||||
|
M x => BIND ++ defStems ! M x ++ BIND ++ "a qaarkiis" ;
|
||||||
|
F x => BIND ++ defStems ! F x ++ BIND ++ "a qaarkeed" } ;
|
||||||
|
sp = \\g,c => case g of {Fem => "qaarkeed" ; _ => "qaarkiis"}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--lin no_Quant = mkPrep no_Quant
|
||||||
|
|
||||||
lin that_Quant = defQuant "aas" "kaas" "taas" "kuwaas" True ;
|
lin that_Quant = defQuant "aas" "kaas" "taas" "kuwaas" True ;
|
||||||
lin this_Quant = defQuant "an" "kan" "tan" "kuwan" True ;
|
lin this_Quant = defQuant "an" "kan" "tan" "kuwan" True ;
|
||||||
--lin which_IQuant = defQuant
|
--lin which_IQuant = defQuant
|
||||||
|
|||||||
Reference in New Issue
Block a user