mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-10 23:56:32 -06:00
Merge branch 'GrammaticalFramework:master' into master
This commit is contained in:
@@ -80,6 +80,7 @@ concrete CatMay of Cat = CommonX - [IAdv] ** open ResMay, Prelude in {
|
||||
Card = ResMay.CardNum ;
|
||||
Numeral = ResMay.CardOrdNum ;
|
||||
Digits = ResMay.DigNum ;
|
||||
Decimal = ResMay.DigNum**{hasDot : Bool} ;
|
||||
|
||||
|
||||
|
||||
@@ -132,4 +133,4 @@ concrete CatMay of Cat = CommonX - [IAdv] ** open ResMay, Prelude in {
|
||||
-- Determiner : Type = Quant ** {
|
||||
-- pr : Str ; -- prefix for numbers
|
||||
-- n : NumType ; -- number as in 5 (noun in singular), Sg or Pl
|
||||
-- } ;
|
||||
-- } ;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete ConstructionMay of Construction = CatMay ** open ParadigmsMay in {
|
||||
concrete ConstructionMay of Construction = CatMay ** open ParadigmsMay, (L=LexiconMay), (G=GrammarMay) in {
|
||||
|
||||
lincat
|
||||
Timeunit = N ;
|
||||
@@ -6,13 +6,15 @@ lincat
|
||||
Monthday = NP ;
|
||||
Month = N ;
|
||||
Year = NP ;
|
||||
{-
|
||||
|
||||
lin
|
||||
|
||||
timeunitAdv n time =
|
||||
let n_card : Card = n ;
|
||||
n_hours_NP : NP = mkNP n_card time ;
|
||||
in SyntaxMay.mkAdv for_Prep n_hours_NP | mkAdv (n_hours_NP.s ! R.npNom) ;
|
||||
has_age_VP card = G.ComplSlash (G.SlashV2a umur_V2) (G.DetCN (G.DetQuant G.IndefArt (G.NumCard card)) (G.UseN L.year_N)) ;
|
||||
|
||||
oper
|
||||
umur_V2 : V2 = mkV2 (mkV "umur") noPrep ;
|
||||
|
||||
{-
|
||||
|
||||
weekdayPunctualAdv w = ; -- on Sunday
|
||||
weekdayHabitualAdv w = ; -- on Sundays
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
resource MissingMay = open GrammarMay, Prelude in {
|
||||
oper AdAP : AdA -> AP -> AP = notYet "AdAP" ;
|
||||
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
|
||||
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
||||
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
|
||||
oper AdVVPSlash : AdV -> VPSlash -> VPSlash = notYet "AdVVPSlash" ;
|
||||
oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
||||
@@ -54,7 +53,6 @@ oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
||||
oper ImpP3 : NP -> VP -> Utt = notYet "ImpP3" ;
|
||||
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
||||
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
|
||||
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
||||
@@ -113,14 +111,11 @@ oper art_N : N = notYet "art_N" ;
|
||||
oper as_CAdv : CAdv = notYet "as_CAdv" ;
|
||||
oper ashes_N : N = notYet "ashes_N" ;
|
||||
oper ask_V2Q : V2Q = notYet "ask_V2Q" ;
|
||||
oper at_least_AdN : AdN = notYet "at_least_AdN" ;
|
||||
oper at_most_AdN : AdN = notYet "at_most_AdN" ;
|
||||
oper baby_N : N = notYet "baby_N" ;
|
||||
oper back_N : N = notYet "back_N" ;
|
||||
oper bad_A : A = notYet "bad_A" ;
|
||||
oper bank_N : N = notYet "bank_N" ;
|
||||
oper bark_N : N = notYet "bark_N" ;
|
||||
oper because_Subj : Subj = notYet "because_Subj" ;
|
||||
oper become_VA : VA = notYet "become_VA" ;
|
||||
oper beer_N : N = notYet "beer_N" ;
|
||||
oper before_Prep : Prep = notYet "before_Prep" ;
|
||||
|
||||
@@ -101,16 +101,20 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
|
||||
s = dig.s ! NCard
|
||||
} ;
|
||||
|
||||
NumDecimal dec = {
|
||||
s = dec.s ! NCard
|
||||
} ;
|
||||
|
||||
-- : Numeral -> Card ;
|
||||
NumNumeral num = num ;
|
||||
|
||||
{-
|
||||
|
||||
-- : AdN -> Card -> Card ;
|
||||
AdNum adn card = card ** { s = adn.s ++ card.s } ;
|
||||
|
||||
-- : Digits -> Ord ;
|
||||
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
||||
-}
|
||||
|
||||
-- : Numeral -> Ord ;
|
||||
OrdNumeral num = {
|
||||
s = num.ord
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- David Wahlstedt 2002 (cardinal numbers)
|
||||
-- Inari Listenmaa 2020 (ordinals + cosmetic changes)
|
||||
concrete NumeralMay of Numeral = CatMay [Numeral,Digits] **
|
||||
concrete NumeralMay of Numeral = CatMay [Numeral,Digits,Decimal] **
|
||||
open Prelude, ResMay in {
|
||||
|
||||
lincat
|
||||
@@ -151,6 +151,16 @@ oper
|
||||
D_8 = mkDig "8" ;
|
||||
D_9 = mkDig "9" ;
|
||||
|
||||
PosDecimal d = d ** {hasDot=False} ;
|
||||
NegDecimal d = {s=\\o=>"-" ++ BIND ++ d.s ! o; hasDot=False} ;
|
||||
IFrac d i = {
|
||||
s=\\o=>d.s ! NCard ++
|
||||
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++
|
||||
i.s ! o ;
|
||||
hasDot=True;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
oper
|
||||
mkDig : Str -> DigNum = \s -> {
|
||||
s = table {
|
||||
|
||||
@@ -3,11 +3,11 @@ concrete StructuralMay of Structural = CatMay **
|
||||
|
||||
-------
|
||||
-- Ad*
|
||||
lin at_least_AdN = ss "sekurangnya" ;
|
||||
lin at_most_AdN = ss "paling tua" ;
|
||||
{-
|
||||
lin almost_AdA = mkAdA "" ;
|
||||
lin almost_AdN = ss "" ;
|
||||
lin at_least_AdN = ss "" ;
|
||||
lin at_most_AdN = ss "" ;
|
||||
lin so_AdA = ss "" ;
|
||||
lin too_AdA = ss "" ;
|
||||
lin very_AdA = mkAdA "" ;
|
||||
@@ -154,7 +154,7 @@ lin whoSg_IP = mkIP "siapa";
|
||||
-- Subj
|
||||
|
||||
-- lin although_Subj =
|
||||
-- lin because_Subj =
|
||||
lin because_Subj = ss "kerana" ;
|
||||
lin if_Subj = ss "sekiranya" ;
|
||||
lin that_Subj = ss "yang" ;
|
||||
lin when_Subj = ss "kalau" ;
|
||||
|
||||
Reference in New Issue
Block a user