1
0
forked from GitHub/gf-rgl
This commit is contained in:
Krasimir Angelov
2018-09-07 11:53:03 +02:00
10 changed files with 45 additions and 31 deletions

View File

@@ -89,6 +89,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
V2, V2A = ResAra.Verb ** {c2 : Str} ;
V2V, V2S, V2Q = ResAra.Verb ** {c2 : Str} ; --- AR
V3 = ResAra.Verb ** {c2, c3 : Str} ;
VV = ResAra.Verb ** {isAux : Bool} ; --- IL
-- VV = {s : VVForm => Str ; isAux : Bool} ;
A = ResAra.Adj ;

View File

@@ -30,7 +30,6 @@ oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ;
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
oper ConjNP : Conj -> ListNP -> NP = notYet "ConjNP" ;
@@ -94,7 +93,6 @@ oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
oper UttVP : VP -> Utt = notYet "UttVP" ;
oper VocNP : NP -> Voc = notYet "VocNP" ;
oper it_Pron : Pron = notYet "it_Pron" ;
oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ;
oper which_IQuant : IQuant = notYet "which_IQuant" ;

View File

@@ -215,7 +215,7 @@ resource ParadigmsAra = open
mkV0 : V -> V0 ;
mkVS : V -> VS ;
mkV2S : V -> Str -> V2S ;
-- mkVV : V -> VV ;
mkVV : V -> VV ;
mkV2V : V -> Str -> Str -> V2V ;
mkVA : V -> VA ;
mkV2A : V -> Str -> V2A ;
@@ -507,6 +507,8 @@ resource ParadigmsAra = open
mkVS v = v ** {lock_VS = <>} ;
mkVQ v = v ** {lock_VQ = <>} ;
mkVV v = lin VV v ** {isAux = False} ;
V0 : Type = V ;
---- V2S, V2V, V2Q, V2A : Type = V2 ;
AS, A2S, AV : Type = A ;

View File

@@ -12,10 +12,14 @@ concrete PhraseAra of Phrase = CatAra ** open
UttIAdv s = {s = \\g => s.s} ; ---- OK? AR
UttQS qs = {s = \\g => qs.s ! QDir} ;
UttImpSg pol imp = {s = \\g => imp.s ! pol.p ! g ! ResAra.Sg} ;
-- UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
UttImpSg pol imp = {s = \\g => imp.s ! pol.p ! g ! ResAra.Sg ++ pol.s} ;
UttImpPl,UttImpPol = \pol,imp -> {s = \\g => imp.s ! pol.p ! g ! ResAra.Pl ++ pol.s} ;
--
UttIP ip = {s = \\_ => ip.s} ; ---- AR
-- AP = { s : Species => Gender => Number => State => Case => Str } ;
UttAP ap = {s = \\g => ap.s ! NoHum ! g ! Sg ! Def ! Nom } ; ---- OK? IL
-- UttIAdv iadv = iadv ;
UttNP np = {s = \\_ => np.s ! Nom} ;
-- UttVP vp = {s = infVP False vp (agrP3 Sg)} ;

View File

@@ -1035,6 +1035,12 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
s2 : Str
};
linVP : VP -> Str = \vp -> --used for the first dummy implementation of ComplVV --IL
vp.s ! Per3 Masc Sg ! VPPerf ++ vp.s2 ++
case vp.isPred of {
True => vp.pred.s ! {g=Masc ; n=Sg} ! Acc ;
False => vp.obj.s } ;
predV : Verb -> VP = \v ->
{ s = \\pgn,vf =>
let gn = pgn2gn pgn in
@@ -1061,29 +1067,16 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
_ => pgn
};
insertObj : NP -> VP -> VP = \np,vp ->
{ s = vp.s;
obj = {s = np.s ! Acc ; a = np.a};
s2 = vp.s2;
pred = vp.pred;
isPred = vp.isPred
};
insertObj : NP -> VP -> VP = \np,vp -> vp **
{ obj = {s = np.s ! Acc ; a = np.a} };
insertPred : {s : AAgr => Case => Str} -> VP -> VP = \p,vp ->
{ s = vp.s;
obj = vp.obj;
s2 = vp.s2;
pred = p;
insertPred : {s : AAgr => Case => Str} -> VP -> VP = \p,vp -> vp **
{ pred = p;
isPred = True
};
insertStr : Str -> VP -> VP = \str,vp ->
{ s = vp.s;
obj = vp.obj;
s2 = str;
pred = vp.pred;
isPred = vp.isPred
};
insertStr : Str -> VP -> VP = \str,vp -> vp **
{ s2 = str };
kaan : {s : AAgr => Case => Str} -> VP = \xabar ->
insertPred xabar (predV (v1hollow {f = "ك"; c = "و" ; l = "ن"} u) );

View File

@@ -44,7 +44,7 @@ concrete StructuralAra of Structural = CatAra **
in8front_Prep = ss "مُقَابِلَ" ;
i_Pron = mkPron "أَنَا" "نِي" "ِي" (Per1 Sing);
in_Prep = ss "فِي" ;
-- it_Pron = mkPron "ِت" "ِت" "ِتس" Sg P3 ;
it_Pron = mkPron "ِت" "ِت" "ِتس" (Per3 Masc Sg); -- IL: check
-- less_CAdv = ss "لسّ" ;
many_Det = mkDet "جَمِيع" Pl Const ;
-- more_CAdv = ss "مْري" ;

View File

@@ -5,18 +5,20 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra in {
lin
UseV = predV ;
SlashVV vv vps = vps ** predV vv ; ---- totally wrong /IL
SlashV2a v = predV v ** {c2 = v.c2};
Slash3V3 v np = insertObj np (predV v) ** {c2 = v.c2};
ComplSlash vp np = insertObj np vp ;
-- ComplV3 v np np2 = insertObj np2 (insertObj np (predV v)) ;
-- Complv3 v np np2 = insertObj np2 (insertObj np (predV v)) ;
{-{s = \\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc ;
a = {pgn = Per3 Masc Sg ; isPron = False} } --FIXME
(predV v) ;-}
--
-- ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ;
-- First dummy implementation / IL 2018-09-06
ComplVV v vp = insertStr (linVP vp) (predV v) ;
--
-- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
-- ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;

View File

@@ -6,4 +6,7 @@ concrete AllEng of AllEngAbs =
blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V,
sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V],
ExtendEng
** {} ;
**
open ExtraEng --- to force compilation since this module is used in many places
in
{} ;

View File

@@ -5,7 +5,7 @@ concrete ExtendPor of Extend =
[
iFem_Pron, weFem_Pron, youFem_Pron, youPlFem_Pron, youPolPl_Pron, youPolFem_Pron, youPolPlFem_Pron, theyFem_Pron,
ProDrop,
PassVPSlash, ExistsNP
PassVPSlash, ExistsNP, VPS
] -- put the names of your own definitions here
with
(Grammar = GrammarPor), (Syntax = SyntaxPor) **
@@ -18,6 +18,18 @@ concrete ExtendPor of Extend =
ParadigmsPor,
(S = StructuralPor) in {
lincat
VPS = {s : Agr => Str} ;
[VPS] = {s1,s2 : Agr => Str} ;
-- VPI = {s : VType => Agr => Str } ;
lin
BaseVPS = twotable Agr ;
ConsVPS = consrTable Agr comma ;
-- MkVPS t p vp = mkVPS (lin Temp t) (lin Pol p) (lin VP vp) ;
--TODO: write mkVPS oper
lin
ProDrop p = {
s = table {

View File

@@ -112,7 +112,6 @@ concrete StructuralPor of Structural = CatPor **
nothing_NP = pn2npNeg (mkPN "nada") ;
on_Prep = mkPrep "sobre" ;
--- one_Quant = {s = \\g,c => prepCase c ++ genForms "uno" "una" ! g} ;
only_Predet = {s = \\_,c => prepCase c ++ "só" ; c = Nom ;
a = PNoAg} ;
or_Conj = {s1 = [] ; s2 = "ou" ; n = Sg} ;