mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 09:28:54 -06:00
Implemented functions NumDigits, NumNumeral, OrdDigits,OrdNumeral, OrdSuperl but with changes in Structural and CatCgg for the categories
This commit is contained in:
@@ -62,9 +62,10 @@ lincat
|
|||||||
root : Str;
|
root : Str;
|
||||||
morphs : Res.VFormMini => Res.VerbMorphPos =>Str --; compl : Str -- after verb: complement, adverbs
|
morphs : Res.VFormMini => Res.VerbMorphPos =>Str --; compl : Str -- after verb: complement, adverbs
|
||||||
} ;
|
} ;
|
||||||
Numeral = {s : Str ; g : Res.Gender; n: Res.Number} ;
|
Numeral = {s : Res.CardOrd=>Res.Agreement=> Str ; g : Res.Gender; n: Res.Number} ;
|
||||||
Digits = {s : Res.CardOrd => Res.Agreement=>Str ; n : Res.Number ; tail : Px.DTail} ;
|
Digits = {s : Res.CardOrd => Res.Agreement=>Str ; n : Res.Number ; tail : Px.DTail} ;
|
||||||
|
Ord = {s :Res.Agreement=>Str; position1:Res.Position1} ;
|
||||||
|
Card = {s :Res.Agreement=>Str; n : Res.Number} ;
|
||||||
--VV =
|
--VV =
|
||||||
{-
|
{-
|
||||||
--1 Cat: the Category System
|
--1 Cat: the Category System
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
--# -path=.:../prelude:../abstract:../common
|
--# -path=.:../prelude:../abstract:../common
|
||||||
|
|
||||||
concrete NounCgg of Noun = CatCgg **
|
concrete NounCgg of Noun = CatCgg **
|
||||||
open ResCgg, Prelude in {
|
open ResCgg, Prelude, Predef in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ lin
|
|||||||
AdvNP np adv = {s= \\c => np.s ! c ++ adv.s; agr = np.agr };
|
AdvNP np adv = {s= \\c => np.s ! c ++ adv.s; agr = np.agr };
|
||||||
--PPartNP : NP -> V2 -> NP ; -- the man seen use the Passive form of the verb see. abantu abarebirwe
|
--PPartNP : NP -> V2 -> NP ; -- the man seen use the Passive form of the verb see. abantu abarebirwe
|
||||||
PPartNP np v2 =
|
PPartNP np v2 =
|
||||||
{s= \\c => np.s!c ++ mkSubjClitic np.agr ++ v2.s ++ Predef.BIND ++ v2.morphs!VFPastPart!RestOfVerb; agr = np.agr};
|
{s= \\c => np.s!c ++ mkSubjClitic np.agr ++ v2.s ++ BIND ++ v2.morphs!VFPastPart!RestOfVerb; agr = np.agr};
|
||||||
|
|
||||||
{-What the hell does this mean?-}
|
{-What the hell does this mean?-}
|
||||||
ExtAdvNP np adv = {s= \\c => np.s ! c ++ embedInCommas adv.s; agr = np.agr}; -- how do I do the adverbial clause?
|
ExtAdvNP np adv = {s= \\c => np.s ! c ++ embedInCommas adv.s; agr = np.agr}; -- how do I do the adverbial clause?
|
||||||
@@ -88,23 +88,27 @@ lin
|
|||||||
DetQuant quant num = {s=[]; s2 = quant.s2; ntype = Incomplete; num = num.n; pos=PreDeterminer; doesAgree = quant.doesAgree}; --
|
DetQuant quant num = {s=[]; s2 = quant.s2; ntype = Incomplete; num = num.n; pos=PreDeterminer; doesAgree = quant.doesAgree}; --
|
||||||
|
|
||||||
--DetQuantOrd : Quant -> Num -> Ord -> Det ; -- these five best
|
--DetQuantOrd : Quant -> Num -> Ord -> Det ; -- these five best
|
||||||
|
--DetQuantOrd quant num ord = {};
|
||||||
|
|
||||||
|
NumSg = {s=[]; n=Sg};
|
||||||
|
NumPl = {s=[]; n=Pl};
|
||||||
|
|
||||||
|
|
||||||
{-
|
|
||||||
Need sample quatitifiers in Runynakore. Immediate, Far, Distant. so DetQuant is commented out
|
|
||||||
-}
|
|
||||||
--DetQuant quant num = {s = quant.s ++ num.s ; ntype = Complete ; num = num.n ; pos = PostDeterminer } ;
|
|
||||||
|
|
||||||
--NumSg = {s=[]; n=Sg};
|
|
||||||
--NumPl = {s=[]; n=Pl};
|
|
||||||
-- NumCard card = {...};
|
-- NumCard card = {...};
|
||||||
|
--Quant = {s : Str ; s2 :Res.Agreement => Str; doesAgree : Bool} ;
|
||||||
|
IndefArt = {s=[]; s2 = \\_=>[]; doesAgree = False};
|
||||||
|
DefArt = {s=[]; s2 = \\_=>[]; doesAgree = False}; -- noun with initial vowel
|
||||||
|
|
||||||
--IndefArt = {s=[]};
|
--NumDigits : Digits -> Card ; -- 51
|
||||||
--DefArt = {s=[]} ;
|
NumDigits dig = {s = dig.s!NCard ; n=dig.n};
|
||||||
|
--NumNumeral : Numeral -> Card ; -- fifty-one
|
||||||
|
NumNumeral numeral = {s=numeral.s!NCard; n=numeral.n};
|
||||||
|
--OrdDigits : Digits -> Ord ; -- 51st
|
||||||
|
OrdDigits dig ={s=dig.s!NOrd ; position1 = Post};
|
||||||
|
|
||||||
|
--OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||||
|
OrdNumeral numeral ={s=numeral.s!NOrd; position1 = Post};
|
||||||
|
--OrdSuperl : A -> Ord ; -- warmest
|
||||||
|
--Adjective : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
||||||
|
OrdSuperl a = {s= \\c => a.s ++ "kukira" ++ (mkAdjPronIVClitic c) ++ BIND ++ "ona"; position1 = a.position1};
|
||||||
-- AdvCN : CN -> Adv -> CN ; -- house on the hill
|
-- AdvCN : CN -> Adv -> CN ; -- house on the hill
|
||||||
--AdvCN cn adv ={s=\\ntype,num =>cn.s!ntype!num ++ adv.s!(AgP3 num cn.nc); nc=cn.nc};
|
--AdvCN cn adv ={s=\\ntype,num =>cn.s!ntype!num ++ adv.s!(AgP3 num cn.nc); nc=cn.nc};
|
||||||
{-
|
{-
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ lincat
|
|||||||
Sub1000000 = {s : Str ; g:Gender; n : Number} ;
|
Sub1000000 = {s : Str ; g:Gender; n : Number} ;
|
||||||
|
|
||||||
|
|
||||||
lin num x = x ; --Numeral = {s : Res.CardOrd => Res.Agreement => Str ; n : Res.Number} ;
|
lin num x = {s = \\_,_=> x.s; g=x.g; n=x.n} ; --Numeral = {s : Res.CardOrd => Res.Agreement => Str ; n : Res.Number} ;
|
||||||
lin n2 = mkNum "biri" "ibiri" ZERO_ZERO "abiri" I_MA True;
|
lin n2 = mkNum "biri" "ibiri" ZERO_ZERO "abiri" I_MA True;
|
||||||
lin n3 = mkNum "shatu" "ishatu" I_ZERO "ashatu" I_MA True;
|
lin n3 = mkNum "shatu" "ishatu" I_ZERO "ashatu" I_MA True;
|
||||||
lin n4 = mkNum "na" "ina" I_ZERO "ana" I_MA True;
|
lin n4 = mkNum "na" "ina" I_ZERO "ana" I_MA True;
|
||||||
|
|||||||
@@ -133,8 +133,8 @@ here_Adv = {s = "hanu"; agr = AgrNo};
|
|||||||
For DetQuant function to work, we need sample quatitifiers in Runynakore. Proximal, Medial, Distant
|
For DetQuant function to work, we need sample quatitifiers in Runynakore. Proximal, Medial, Distant
|
||||||
We need a table to provide all of these.
|
We need a table to provide all of these.
|
||||||
-}
|
-}
|
||||||
that_Quant = {s =[]; s2 = mkThat; doesAgree = True}; --: Quant ;
|
that_Quant = {s=[]; s2 = mkThat; doesAgree = True}; --: Quant ;
|
||||||
this_Quant = {s =[]; s2 = mkThis; doesAgree = True}; --: Quant ;
|
this_Quant = {s=[]; s2 = mkThis; doesAgree = True}; --: Quant ;
|
||||||
these_Quant = {s =[]; s2 = mkThese; doesAgree = True};
|
these_Quant = {s =[]; s2 = mkThese; doesAgree = True};
|
||||||
those_Quant = {s =[]; s2 = mkThose; doesAgree = True};
|
those_Quant = {s =[]; s2 = mkThose; doesAgree = True};
|
||||||
no_Quant = {s ="tihariho"; s2 =\\_=> []; doesAgree = False};--: Quant ;
|
no_Quant = {s ="tihariho"; s2 =\\_=> []; doesAgree = False};--: Quant ;
|
||||||
|
|||||||
Reference in New Issue
Block a user