1
0
forked from GitHub/gf-rgl

(Ara) add both7and_DConj + make Conj into ConjDistr

This commit is contained in:
Inari Listenmaa
2018-12-29 18:43:25 +02:00
parent 2e34f89c45
commit b73d5010df
5 changed files with 28 additions and 15 deletions

View File

@@ -70,8 +70,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
-- Structural
Conj = {s : Str ; n : ResAra.Number} ;
-- DConj = {s1,s2 : Str ; n : ResAra.Number} ;
Conj = {s1,s2 : Str; n : ResAra.Number} ;
Subj = {s : Str ; o : Order} ;
Prep = ResAra.Preposition ;

View File

@@ -13,11 +13,11 @@ lin
BaseAdv = twoSS ;
ConsAdv = consrSS comma ;
ConjAdv = conjunctSS ;
ConjAdv = conjunctDistrSS ;
BaseS = twoTable Order ;
ConsS = consrTable Order comma ;
ConjS = conjunctTable Order ;
ConjS = conjunctDistrTable Order ;
BaseNP x y = twoTable Case x y ** {
a = conjAgr x.a y.a ;
@@ -27,7 +27,7 @@ lin
a = conjAgr xs.a x.a ;
empty = []
} ;
ConjNP conj ss = conjunctTable Case conj ss ** {
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
a = let gn = pgn2gn ss.a.pgn in
{pgn = Per3 gn.g (conjNumber conj.n gn.n) ; isPron = False} ;
empty = []
@@ -35,7 +35,7 @@ lin
BaseAP = twoTable5 Species Gender Number State Case ;
ConsAP = consrTable5 Species Gender Number State Case comma ;
ConjAP = conjunctTable5 Species Gender Number State Case ;
ConjAP = conjunctDistrTable5 Species Gender Number State Case ;
oper
@@ -74,9 +74,9 @@ oper
\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 :
-- (P,Q,R,T,S : PType) -> ConjunctionDistr -> 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 => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ;
conjunctDistrTable5 :
(P,Q,R,T,S : PType) -> ConjunctionDistr -> 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 => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ;
}

View File

@@ -50,7 +50,7 @@ concrete ExtendAra of Extend =
BaseVPS = twoTable PerGenNum ;
ConsVPS = consrTable PerGenNum comma ;
ConjVPS = conjunctTable PerGenNum ;
ConjVPS = conjunctDistrTable PerGenNum ;
PredVPS np vps = {
s = \\_ => np.s ! Nom ++ vps.s ! np.a.pgn -- first quick version with order always Nominal.

View File

@@ -199,6 +199,13 @@ resource ParadigmsAra = open
mkPrep : Str -> Prep ;
mkPrep : Str -> Case -> Prep
} ; -- preposition in the sense of RGL abstract syntax
--2 Conjunctions
mkConj : overload {
mkConj : Str -> Conj ; -- and
mkConj : Str -> Str -> Conj ; -- either … or
} ;
--2 Verbs
-- Overloaded operations
@@ -592,6 +599,13 @@ resource ParadigmsAra = open
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 ->
lin Pron (ResAra.mkPron ana nI I pgn) ;

View File

@@ -11,12 +11,12 @@ concrete StructuralAra of Structural = CatAra **
almost_AdN = ss "حَوَالي" ; -- or "تَقرِيبا"
-- although_Subj = ss "َلتهُْغه" ;
-- always_AdV = ss "َلوَيس" ;
and_Conj = ss "وَ" ** {n = Pl} ;
and_Conj = mkConj "وَ" Pl ;
-- because_Subj = ss "بعَُسي" ;
before_Prep = mkPrep "قَبْلَ" ;
behind_Prep = mkPrep "خَلْفَ" ;
between_Prep = mkPrep "بَيْنَ" ;
-- both7and_DConj = sd2 "بْته" "َند" ** {n = Pl} ;
both7and_DConj = mkConj "كِلا" "وَ" Pl ;
-- but_PConj = ss "بُت" ;
by8agent_Prep,
by8means_Prep = biPrep ;
@@ -64,7 +64,7 @@ concrete StructuralAra of Structural = CatAra **
no_Utt = {s = \\_ => "لا"} ;
on_Prep = mkPrep "عَلَى" ;
only_Predet = mkPredet "فَقَط" False;
or_Conj = ss "أَوْ" ** {n = Sg} ;
or_Conj = mkConj "أَوْ" ;
-- otherwise_PConj = ss "ْتهروِسي" ;
part_Prep = mkPrep "مِنَ" ;
-- please_Voc = ss "ةلَسي" ;