mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
@@ -69,11 +69,6 @@ oper
|
|||||||
s2 = x.s
|
s2 = x.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
conjunctTable5 :
|
|
||||||
(P,Q,R,T,S : PType) -> Conjunction -> ListTable5 P Q R T S -> {s : P => Q => R => T => S => Str} =
|
|
||||||
\P,Q,R,T,S,or,xs ->
|
|
||||||
{s = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ or.s ++ xs.s2 ! p ! q ! r ! t ! s} ;
|
|
||||||
|
|
||||||
conjunctDistrTable5 :
|
conjunctDistrTable5 :
|
||||||
(P,Q,R,T,S : PType) -> ConjunctionDistr -> ListTable5 P Q R T S ->
|
(P,Q,R,T,S : PType) -> ConjunctionDistr -> ListTable5 P Q R T S ->
|
||||||
{s : P => Q => R => T => S => Str} =
|
{s : P => Q => R => T => S => Str} =
|
||||||
|
|||||||
@@ -46,10 +46,19 @@ lin
|
|||||||
intYear = symb ;
|
intYear = symb ;
|
||||||
intMonthday = symb ;
|
intMonthday = symb ;
|
||||||
|
|
||||||
-- n_units_AP
|
-- : Card -> CN -> A -> AP
|
||||||
|
n_units_AP card cn a =
|
||||||
|
let ap = mkAP a in ap ** {
|
||||||
|
s = \\s,g,n,d,c =>
|
||||||
|
ap.s ! s ! g ! n ! d ! c
|
||||||
|
++ (mkAdv R.biPrep (mkNP amount_N)).s
|
||||||
|
++ (mkNP card cn).s ! R.Bare ---- ? /IL
|
||||||
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
|
amount_N : N = mkN "مِقْدَار" "مَقَادِير" masc nohum ;
|
||||||
|
|
||||||
-- hack used in the name constructions
|
-- hack used in the name constructions
|
||||||
toNP : Bool -> NP -> NP = \b -> if_then_else NP b R.emptyNP ;
|
toNP : Bool -> NP -> NP = \b -> if_then_else NP b R.emptyNP ;
|
||||||
|
|
||||||
|
|||||||
@@ -9,5 +9,3 @@ concrete LangAra of Lang =
|
|||||||
flags startcat = Phr ; unlexer = text ; lexer = text ; coding = utf8 ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ; coding = utf8 ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
|||||||
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||||
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||||
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
||||||
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
|
|
||||||
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
||||||
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
||||||
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ lincat
|
|||||||
lin n5 = num3_10 "خَمس" "خامِس";
|
lin n5 = num3_10 "خَمس" "خامِس";
|
||||||
lin n6 = num3_10 "سِتّ" "سادِس";
|
lin n6 = num3_10 "سِتّ" "سادِس";
|
||||||
lin n7 = num3_10 "سَبع" "سابِع";
|
lin n7 = num3_10 "سَبع" "سابِع";
|
||||||
lin n8 = num3_10 "ثَمانِي" "ثامِن";
|
lin n8 = num3_10 "ثَمَانِي" "ثامِن";
|
||||||
lin n9 = num3_10 "تِسع" "تاسِع";
|
lin n9 = num3_10 "تِسع" "تاسِع";
|
||||||
|
|
||||||
lin pot01 = mkNum "واحِد" "أَوَّل" "أُولى" ** { n = One } ;
|
lin pot01 = mkNum "واحِد" "أَوَّل" "أُولى" ** { n = One } ;
|
||||||
|
|||||||
@@ -148,6 +148,13 @@ resource ParadigmsAra = open
|
|||||||
= \r -> lin A (clrA r);
|
= \r -> lin A (clrA r);
|
||||||
mkA : (root,sg,pl : Str) -> A -- adjective with broken plural
|
mkA : (root,sg,pl : Str) -> A -- adjective with broken plural
|
||||||
= \r,s,p -> lin A (brkA r s p) ;
|
= \r,s,p -> lin A (brkA r s p) ;
|
||||||
|
mkA : A -> Str -> A = \a,s -> a ** { -- add non-inflecting component after adjective
|
||||||
|
s = table {af => a.s ! af ++ s}
|
||||||
|
} ;
|
||||||
|
mkA : Str -> A -> A = \s,a -> a ** { -- add non-inflecting component before adjective
|
||||||
|
s = table {af => s ++ a.s ! af}
|
||||||
|
}
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
idaafaA : N -> A -> A ; -- first argument will be in constructus but inflect in case, adjective in genitive, but inflect in gender, number and definiteness. e.g. غَيْرُ طَيِّبٍ
|
idaafaA : N -> A -> A ; -- first argument will be in constructus but inflect in case, adjective in genitive, but inflect in gender, number and definiteness. e.g. غَيْرُ طَيِّبٍ
|
||||||
@@ -276,10 +283,10 @@ resource ParadigmsAra = open
|
|||||||
-- questions, verb phrases, and adjectives.
|
-- questions, verb phrases, and adjectives.
|
||||||
|
|
||||||
mkV0 : V -> V0 ;
|
mkV0 : V -> V0 ;
|
||||||
-- mkVS = overload {
|
mkVS : overload {
|
||||||
-- mkVS : V -> VS ;
|
mkVS : V -> VS ;
|
||||||
-- mkVS : V -> Str -> VS
|
mkVS : V -> Str -> VS
|
||||||
-- } ;
|
} ;
|
||||||
mkV2S : V -> Str -> V2S ;
|
mkV2S : V -> Str -> V2S ;
|
||||||
mkVV = overload {
|
mkVV = overload {
|
||||||
mkVV : V -> VV = regVV ;
|
mkVV : V -> VV = regVV ;
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
|
|||||||
cl = PredVP np vp ;
|
cl = PredVP np vp ;
|
||||||
in { s = \\t,p,qf => cl.s ! t ! p ! toOrder qf } ;
|
in { s = \\t,p,qf => cl.s ! t ! p ! toOrder qf } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---- AR guessed
|
---- AR guessed
|
||||||
QuestIAdv iadv cl = {s = \\t,p,qf => iadv.s ++ cl.s ! t ! p ! toOrder qf} ;
|
QuestIAdv iadv cl = {s = \\t,p,qf => iadv.s ++ cl.s ! t ! p ! toOrder qf} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1721,8 +1721,9 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
insertObj : NP -> VPSlash -> VP = \np,vp -> vp ** {
|
insertObj : NP -> VPSlash -> VP = \np,vp -> vp ** {
|
||||||
obj = {s = vp.obj.s -- old object, if there was one
|
obj = {s = vp.obj.s -- old object, if there was one
|
||||||
++ bindIfPron np vp -- new object, bind if pronoun and not pred
|
++ bindIfPron np vp -- new object, bind if pronoun and not pred
|
||||||
++ vp.agrObj ! np.a.pgn ; -- only used for SlashV2V
|
++ vp.agrObj ! np.a.pgn ; -- only used for SlashV2V and Slash3V3
|
||||||
a = agrLite np.a}
|
a = agrLite np.a} ;
|
||||||
|
agrObj = \\_ => []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
bindIf : Bool -> Str = \b -> if_then_Str b BIND [] ;
|
bindIf : Bool -> Str = \b -> if_then_Str b BIND [] ;
|
||||||
|
|||||||
@@ -35,7 +35,22 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashV2a = slashV2 ;
|
SlashV2a = slashV2 ;
|
||||||
Slash3V3 v np = insertObj np (slashV2 v) ** {c2 = v.c3 ; agrObj = \\_ => []};
|
Slash2V3 v np = insertObj np (slashV2 v) ** {c2 = v.c3 ; agrObj = \\_ => []};
|
||||||
|
|
||||||
|
Slash3V3 v np =
|
||||||
|
let vp = slashV2 v ** {c2 =
|
||||||
|
v.c2 ** {
|
||||||
|
s = case np.a.isPron of {
|
||||||
|
True => case v.c2.binds of {
|
||||||
|
True => v.c2.s ; -- to make sure there's something for the object to attach to
|
||||||
|
False => v.c2.s ++ "إِيَّا" } ; -- see https://en.wiktionary.org/wiki/%D8%A5%D9%8A%D8%A7#Particle /IL
|
||||||
|
False => v.c2.s }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
in vp ** {
|
||||||
|
c2 = v.c3 ;
|
||||||
|
agrObj = \\_ => bindIfPron np vp -- will be emptied when insertObj is called /IL
|
||||||
|
} ;
|
||||||
|
|
||||||
ComplSlash vp np = insertObj np vp ;
|
ComplSlash vp np = insertObj np vp ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user