mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Ara) add both7and_DConj + make Conj into ConjDistr
This commit is contained in:
@@ -70,8 +70,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
|||||||
|
|
||||||
-- Structural
|
-- Structural
|
||||||
|
|
||||||
Conj = {s : Str ; n : ResAra.Number} ;
|
Conj = {s1,s2 : Str; n : ResAra.Number} ;
|
||||||
-- DConj = {s1,s2 : Str ; n : ResAra.Number} ;
|
|
||||||
Subj = {s : Str ; o : Order} ;
|
Subj = {s : Str ; o : Order} ;
|
||||||
Prep = ResAra.Preposition ;
|
Prep = ResAra.Preposition ;
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ lin
|
|||||||
|
|
||||||
BaseAdv = twoSS ;
|
BaseAdv = twoSS ;
|
||||||
ConsAdv = consrSS comma ;
|
ConsAdv = consrSS comma ;
|
||||||
ConjAdv = conjunctSS ;
|
ConjAdv = conjunctDistrSS ;
|
||||||
|
|
||||||
BaseS = twoTable Order ;
|
BaseS = twoTable Order ;
|
||||||
ConsS = consrTable Order comma ;
|
ConsS = consrTable Order comma ;
|
||||||
ConjS = conjunctTable Order ;
|
ConjS = conjunctDistrTable Order ;
|
||||||
|
|
||||||
BaseNP x y = twoTable Case x y ** {
|
BaseNP x y = twoTable Case x y ** {
|
||||||
a = conjAgr x.a y.a ;
|
a = conjAgr x.a y.a ;
|
||||||
@@ -27,7 +27,7 @@ lin
|
|||||||
a = conjAgr xs.a x.a ;
|
a = conjAgr xs.a x.a ;
|
||||||
empty = []
|
empty = []
|
||||||
} ;
|
} ;
|
||||||
ConjNP conj ss = conjunctTable Case conj ss ** {
|
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||||
a = let gn = pgn2gn ss.a.pgn in
|
a = let gn = pgn2gn ss.a.pgn in
|
||||||
{pgn = Per3 gn.g (conjNumber conj.n gn.n) ; isPron = False} ;
|
{pgn = Per3 gn.g (conjNumber conj.n gn.n) ; isPron = False} ;
|
||||||
empty = []
|
empty = []
|
||||||
@@ -35,7 +35,7 @@ lin
|
|||||||
|
|
||||||
BaseAP = twoTable5 Species Gender Number State Case ;
|
BaseAP = twoTable5 Species Gender Number State Case ;
|
||||||
ConsAP = consrTable5 Species Gender Number State Case comma ;
|
ConsAP = consrTable5 Species Gender Number State Case comma ;
|
||||||
ConjAP = conjunctTable5 Species Gender Number State Case ;
|
ConjAP = conjunctDistrTable5 Species Gender Number State Case ;
|
||||||
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -74,9 +74,9 @@ oper
|
|||||||
\P,Q,R,T,S,or,xs ->
|
\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} ;
|
{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} =
|
||||||
-- \P,Q,R,T,S,or,xs ->
|
\P,Q,R,T,S,or,xs ->
|
||||||
-- {s = \\p,q,r,t,s => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ;
|
{s = \\p,q,r,t,s => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ concrete ExtendAra of Extend =
|
|||||||
|
|
||||||
BaseVPS = twoTable PerGenNum ;
|
BaseVPS = twoTable PerGenNum ;
|
||||||
ConsVPS = consrTable PerGenNum comma ;
|
ConsVPS = consrTable PerGenNum comma ;
|
||||||
ConjVPS = conjunctTable PerGenNum ;
|
ConjVPS = conjunctDistrTable PerGenNum ;
|
||||||
|
|
||||||
PredVPS np vps = {
|
PredVPS np vps = {
|
||||||
s = \\_ => np.s ! Nom ++ vps.s ! np.a.pgn -- first quick version with order always Nominal.
|
s = \\_ => np.s ! Nom ++ vps.s ! np.a.pgn -- first quick version with order always Nominal.
|
||||||
|
|||||||
@@ -199,6 +199,13 @@ resource ParadigmsAra = open
|
|||||||
mkPrep : Str -> Prep ;
|
mkPrep : Str -> Prep ;
|
||||||
mkPrep : Str -> Case -> Prep
|
mkPrep : Str -> Case -> Prep
|
||||||
} ; -- preposition in the sense of RGL abstract syntax
|
} ; -- preposition in the sense of RGL abstract syntax
|
||||||
|
|
||||||
|
--2 Conjunctions
|
||||||
|
mkConj : overload {
|
||||||
|
mkConj : Str -> Conj ; -- and
|
||||||
|
mkConj : Str -> Str -> Conj ; -- either … or
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
|
|
||||||
-- Overloaded operations
|
-- Overloaded operations
|
||||||
@@ -592,6 +599,13 @@ resource ParadigmsAra = open
|
|||||||
lin N3 (n ** {c2 = mkPreposition p ; c3 = mkPreposition q}) ;
|
lin N3 (n ** {c2 = mkPreposition p ; c3 = mkPreposition q}) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkConj = overload {
|
||||||
|
mkConj : Str -> Conj = \s -> lin Conj {s1 = [] ; s2 = s ; n = Sg} ;
|
||||||
|
mkConj : Str -> Str -> Conj = \s1,s2 -> lin Conj {s1 = s1 ; s2 = s2 ; n = Sg} ;
|
||||||
|
mkConj : Str -> Number -> Conj = \s,n -> lin Conj {s1 = [] ; s2 = s ; n = n} ;
|
||||||
|
mkConj : Str -> Str -> Number -> Conj = \s1,s2,n -> lin Conj {s1 = s1 ; s2 = s2 ; n = n}
|
||||||
|
} ;
|
||||||
|
|
||||||
mkPron : (_,_,_ : Str) -> PerGenNum -> Pron = \ana,nI,I,pgn ->
|
mkPron : (_,_,_ : Str) -> PerGenNum -> Pron = \ana,nI,I,pgn ->
|
||||||
lin Pron (ResAra.mkPron ana nI I pgn) ;
|
lin Pron (ResAra.mkPron ana nI I pgn) ;
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ concrete StructuralAra of Structural = CatAra **
|
|||||||
almost_AdN = ss "حَوَالي" ; -- or "تَقرِيبا"
|
almost_AdN = ss "حَوَالي" ; -- or "تَقرِيبا"
|
||||||
-- although_Subj = ss "َلتهُْغه" ;
|
-- although_Subj = ss "َلتهُْغه" ;
|
||||||
-- always_AdV = ss "َلوَيس" ;
|
-- always_AdV = ss "َلوَيس" ;
|
||||||
and_Conj = ss "وَ" ** {n = Pl} ;
|
and_Conj = mkConj "وَ" Pl ;
|
||||||
-- because_Subj = ss "بعَُسي" ;
|
-- because_Subj = ss "بعَُسي" ;
|
||||||
before_Prep = mkPrep "قَبْلَ" ;
|
before_Prep = mkPrep "قَبْلَ" ;
|
||||||
behind_Prep = mkPrep "خَلْفَ" ;
|
behind_Prep = mkPrep "خَلْفَ" ;
|
||||||
between_Prep = mkPrep "بَيْنَ" ;
|
between_Prep = mkPrep "بَيْنَ" ;
|
||||||
-- both7and_DConj = sd2 "بْته" "َند" ** {n = Pl} ;
|
both7and_DConj = mkConj "كِلا" "وَ" Pl ;
|
||||||
-- but_PConj = ss "بُت" ;
|
-- but_PConj = ss "بُت" ;
|
||||||
by8agent_Prep,
|
by8agent_Prep,
|
||||||
by8means_Prep = biPrep ;
|
by8means_Prep = biPrep ;
|
||||||
@@ -64,7 +64,7 @@ concrete StructuralAra of Structural = CatAra **
|
|||||||
no_Utt = {s = \\_ => "لا"} ;
|
no_Utt = {s = \\_ => "لا"} ;
|
||||||
on_Prep = mkPrep "عَلَى" ;
|
on_Prep = mkPrep "عَلَى" ;
|
||||||
only_Predet = mkPredet "فَقَط" False;
|
only_Predet = mkPredet "فَقَط" False;
|
||||||
or_Conj = ss "أَوْ" ** {n = Sg} ;
|
or_Conj = mkConj "أَوْ" ;
|
||||||
-- otherwise_PConj = ss "ْتهروِسي" ;
|
-- otherwise_PConj = ss "ْتهروِسي" ;
|
||||||
part_Prep = mkPrep "مِنَ" ;
|
part_Prep = mkPrep "مِنَ" ;
|
||||||
-- please_Voc = ss "ةلَسي" ;
|
-- please_Voc = ss "ةلَسي" ;
|
||||||
|
|||||||
Reference in New Issue
Block a user