mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
add kedua-dua (the two, etc.) to Det
This commit is contained in:
@@ -68,7 +68,8 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
|
|||||||
DetQuant quant num = quant ** {
|
DetQuant quant num = quant ** {
|
||||||
pr = num.s ; -- if it's not a number or digit, num.s is empty
|
pr = num.s ; -- if it's not a number or digit, num.s is empty
|
||||||
s = quant.s ;
|
s = quant.s ;
|
||||||
n = num.n
|
n = num.n ;
|
||||||
|
count = "ke" ++ BIND ++ num.s ++ BIND ++ "-" ++ BIND ++ num.s;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Quant -> Num -> Ord -> Det ;
|
-- : Quant -> Num -> Ord -> Det ;
|
||||||
@@ -76,6 +77,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
|
|||||||
pr = num.s ;
|
pr = num.s ;
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
s = ord.s ++ quant.s ;
|
s = ord.s ++ quant.s ;
|
||||||
|
count = "" ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Whether the resulting determiner is singular or plural depends on the
|
-- Whether the resulting determiner is singular or plural depends on the
|
||||||
@@ -208,7 +210,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
|
|||||||
-- : Det -> NP -> NP ;
|
-- : Det -> NP -> NP ;
|
||||||
CountNP det np = np **
|
CountNP det np = np **
|
||||||
{
|
{
|
||||||
s = \\pos => "ke" ++ BIND ++ linDet det ++ BIND ++ "-" ++ BIND ++ linDet det ++ np.s ! pos;
|
s = \\pos => det.count ++ np.s ! pos;
|
||||||
} ; -- Nonsense for DefArt or IndefArt
|
} ; -- Nonsense for DefArt or IndefArt
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ lin
|
|||||||
-- if isPre is True, then: "berapa kucing"
|
-- if isPre is True, then: "berapa kucing"
|
||||||
s = case iquant.isPre of { False => iquant.s ; True => [] };
|
s = case iquant.isPre of { False => iquant.s ; True => [] };
|
||||||
-- if isPre is False, use s: "kucing berapa"
|
-- if isPre is False, use s: "kucing berapa"
|
||||||
n = num.n
|
n = num.n ;
|
||||||
|
count = "" ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ oper
|
|||||||
Determiner : Type = Quant ** {
|
Determiner : Type = Quant ** {
|
||||||
pr : Str ; -- prefix for numbers
|
pr : Str ; -- prefix for numbers
|
||||||
n : NumType ; -- number as in 5 (noun in singular), Sg or Pl
|
n : NumType ; -- number as in 5 (noun in singular), Sg or Pl
|
||||||
|
count: Str ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
CardNum : Type = {
|
CardNum : Type = {
|
||||||
@@ -130,16 +131,17 @@ oper
|
|||||||
sp = \\_ => str
|
sp = \\_ => str
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkDet : Str -> Number -> Determiner = \str, num -> mkQuant str ** {
|
mkDet : Str -> Str -> Number -> Determiner = \cnt, str, num -> mkQuant str ** {
|
||||||
pr = "" ;
|
pr = "" ;
|
||||||
n = NoNum num ;
|
n = NoNum num ;
|
||||||
|
count = "" ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkIdet : Str -> Str -> Number -> Bool -> Determiner = \str, standalone, num, isPre -> mkDet str num ** {
|
mkIdet : Str -> Str -> Str -> Number -> Bool -> Determiner = \cnt, str, standalone, num, isPre -> mkDet cnt str num ** {
|
||||||
pr = case isPre of {True => str ; False => [] } ;
|
pr = case isPre of {True => str ; False => [] } ;
|
||||||
-- if isPre is True, then: "berapa kucing"
|
-- if isPre is True, then: "berapa kucing"
|
||||||
s = case isPre of { False => str ; True => [] };
|
s = case isPre of { False => str ; True => [] };
|
||||||
|
count = cnt ;
|
||||||
sp = \\_ => standalone ;
|
sp = \\_ => standalone ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ lin and_Conj = {s2 = "dan" ; s1 = [] ; n = Pl} ;
|
|||||||
-- *Det and Quant
|
-- *Det and Quant
|
||||||
|
|
||||||
|
|
||||||
lin how8many_IDet = mkIdet "berapa" "berapa banyak" Sg True;
|
lin how8many_IDet = mkIdet "berapa" "berapa banyak" "" Sg True;
|
||||||
{-}
|
{-}
|
||||||
lin all_Predet = {s = ""} ;
|
lin all_Predet = {s = ""} ;
|
||||||
lin not_Predet = { s = "" } ;
|
lin not_Predet = { s = "" } ;
|
||||||
|
|||||||
Reference in New Issue
Block a user