1
0
forked from GitHub/gf-rgl

Merge remote-tracking branch 'upstream/master' into missing-romance

This commit is contained in:
odanoburu
2018-03-28 16:00:25 -03:00
9 changed files with 64 additions and 31 deletions

18
src/basque/ExtendEus.gf Normal file
View File

@@ -0,0 +1,18 @@
--# -path=.:../common:../abstract
concrete ExtendEus of Extend =
CatEus ** ExtendFunctor - [GenNP,ICompAP]
with (Grammar=GrammarEus)
** open Prelude, ResEus in {
lin
GenNP np = -- NP -> Quant ; -- this man's
{ s = artDef ;
indep, isDef = True ;
pref = np.s ! Gen } ;
ICompAP ap = -- AP -> IComp ; -- "how old"
{ s = "nola" ++ ap.s ! Hau } ; --TODO agreement -- change type of IComp
} ;

View File

@@ -1,7 +1,7 @@
--1 Idiom: Idiomatic Expressions
concrete IdiomEus of Idiom = CatEus ** open Prelude, ResEus in {
concrete IdiomEus of Idiom = CatEus ** open Prelude, ResEus, VerbEus in {
-- This module defines constructions that are formed in fixed ways,
-- often different even in closely related languages.
@@ -16,9 +16,12 @@ concrete IdiomEus of Idiom = CatEus ** open Prelude, ResEus in {
{-
CleftNP : NP -> RS -> Cl ; -- it is I who did it
CleftAdv : Adv -> S -> Cl ; -- it is here she slept
-}
-- : NP -> Cl ; -- there is a house
ExistNP np = let vp = UseComp (CompNP np)
in clFromVP empty_NP vp ;
ExistNP : NP -> Cl ; -- there is a house
ExistIP : IP -> QCl ; -- which houses are there
{- ExistIP : IP -> QCl ; -- which houses are there
-- 7/12/2012 generalizations of these

View File

@@ -10,11 +10,8 @@ oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
oper ExistIPAdv : IP -> Adv -> QCl = notYet "ExistIPAdv" ;
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
oper ExistNPAdv : NP -> Adv -> Cl= notYet "ExistNPAdv" ;
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
oper ImpP3 : NP -> VP -> Utt = notYet "ImpP3" ;
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
oper QuestQVP : IP -> QVP -> QCl = notYet "QuestQVP" ;
oper SelfAdVVP : VP -> VP = notYet "SelfAdVVP" ;
oper SelfAdvVP : VP -> VP = notYet "SelfAdvVP" ;

View File

@@ -93,6 +93,7 @@ oper
lin V2 (egin ** { prc = \\t => lo ++ egin.prc ! t ;
val = Du Ukan }) ;
mkV2 : V -> V2 = \x -> lin V2 x ;
} ;
mkVA : Str -> VA = \s -> lin VA (mkVerbDa s) ; -- Nor

View File

@@ -100,7 +100,9 @@ oper
| VPerfFut
| VCondSimul
| VCondAnter -- subj na "I می گْ"
;
| VVVForm -- AR 21/3/2018 for mustCl after Nasrin
| VRoot1 -- AR 22/3/2018 for mustCl past after Nasrin
;
VType = VIntrans | VTrans | VTransPost ;
@@ -333,8 +335,6 @@ mkSlClause : NP -> VPH -> SlClause = \np,vp -> {
<Pos,VPerfFut> => case vp.wish of
{True => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
False => vp.s ! VPTense Pos (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
<Pos,VCondSimul> => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ;
<Pos,VCondAnter> => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed
<Neg,VPerfPast> => vp.s ! VPTense Neg (VPPast Anter) (AgPes n p) ;
<Neg,VFut> => case vp.wish of
{True => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
@@ -342,11 +342,17 @@ mkSlClause : NP -> VPH -> SlClause = \np,vp -> {
<Neg,VPerfFut> => case vp.wish of
{True => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
False => vp.s ! VPTense Neg (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
<Pos,VCondSimul> => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ;
<Pos,VCondAnter> => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed
<Neg,VCondSimul> => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ;
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) -- verb form to be confirmed
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) ; -- verb form to be confirmed
<_, VVVForm> => vp.s ! VVForm (AgPes n p) ; -- AR 21/3/2018
<_, VRoot1> => vp.s ! VPStem1 {- ++ Predef.Bind ++ "ه" -} -- AR 22/3/2018
};
---- VVForm (AgPes n p) => {inf = verb.s ! Vvform (AgPes n p)} ;
@@ -388,7 +394,9 @@ mkSClause : Str -> AgrPes -> VPH -> Clause = \subj,agr,vp -> {
{True => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
False => vp.s ! VPTense Neg (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
<Neg,VCondSimul> => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ;
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) -- verb form to be confirmed
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) ; -- verb form to be confirmed
<_, VVVForm> => vp.s ! VVForm (AgPes n p) ; -- AR 21/3/2018
<_, VRoot1> => vp.s ! VPStem1 {- ++ Predef.Bind ++ "ه" -} -- AR 22/3/2018
};
@@ -418,7 +426,7 @@ mkSClause : Str -> AgrPes -> VPH -> Clause = \subj,agr,vp -> {
VPTense pol (VPFutr Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ; -- this is to be confirmed
VPTense pol (VPCond Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ;
VPTense pol (VPCond Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPast PstImperf) p n } ;
VVForm (AgPes n p) => {inf = ""} ; -- to be checked
VVForm (AgPes n p) => {inf = ""} ; -- to be checked => {inf = verb.s ! Vvform (AgPes n p)} ;
VPStem1 => { inf = ""};
VPStem2 => { inf = "بود"} ;
VPImp _ _ => { inf = ""} -- need to be confirmed

View File

@@ -7,39 +7,41 @@ flags coding=utf8 ;
lin
PositA a = { s = mkAtable a.pos; adv = a.advpos};
PositA a = { s = mkAtable a.pos; adv = a.advpos ; isPost = False};
UseComparA a = { s = mkAtable a.comp; adv=a.advcomp};
UseComparA a = { s = mkAtable a.comp; adv=a.advcomp ; isPost = False};
ComparA a np = { s = \\af => (mkAtable a.comp) ! af ++ "niż" ++ np.nom ; adv=a.advcomp };
ComparA a np = { s = \\af => (mkAtable a.comp) ! af ++ "niż" ++ np.nom ; adv=a.advcomp ; isPost = False};
AdjOrd o = {s=o.s; adv="["++o.s!AF MascPersSg Nom ++ [": the adverb form does not exist (fun AdjOrd)]"]};
AdjOrd o = {s=o.s; adv="["++o.s!AF MascPersSg Nom ++ [": the adverb form does not exist (fun AdjOrd)]"] ; isPost = False};
AdAP ada ap = { s = \\af => ada.s ++ ap.s ! af; adv = ada.s ++ ap.adv};
AdAP ada ap = { s = \\af => ada.s ++ ap.s ! af; adv = ada.s ++ ap.adv ; isPost = ap.isPost};
-- CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
CAdvAP c a n = {
s = \\af=> c.s ++ a.s!af ++ c.p ++ n.nom;
adv = c.s ++ a.adv ++ c.p ++ n.nom;
isPost = False
};
-- ComplA2 : A2 -> NP -> AP ; -- married to her
ComplA2 a n = {
s = \\af=>(mkAtable a.pos)!af ++ a.c.s ++ n.dep!a.c.c;
adv = a.advpos ++ a.c.s ++ n.dep!a.c.c
adv = a.advpos ++ a.c.s ++ n.dep!a.c.c ;
isPost = True
};
-- ReflA2 : A2 -> AP ; -- married to itself
ReflA2 a = {
s = \\af=>(mkAtable a.pos)!af ++ a.c.s ++ siebie!(extract_case!a.c.c);
adv = a.advpos ++ a.c.s ++ siebie!(extract_case!a.c.c)
adv = a.advpos ++ a.c.s ++ siebie!(extract_case!a.c.c) ; isPost = True
};
-- UseA2 : A2 -> AP ; -- married
UseA2 a = { s = mkAtable a.pos; adv=a.advpos};
UseA2 a = { s = mkAtable a.pos; adv=a.advpos ; isPost = False};
-- SentAP : AP -> SC -> AP ; -- good that she is here -- I have bad feelling about this function
SentAP a s = {s=\\_=>a.adv ++ s.s; adv=a.adv ++ s.s };
SentAP a s = {s=\\_=>a.adv ++ s.s; adv=a.adv ++ s.s ; isPost = True};
};

View File

@@ -39,6 +39,7 @@ concrete ConjunctionPol of Conjunction =
ConjAP conj list = {
adv = conj.s1 ++ list.ap1.adv ++ conj.s2 ++ list.ap2.adv;
s = \\af=>conj.s1 ++ list.ap1.s!af ++ conj.s2 ++ list.ap2.s!af;
isPost = list.ap2.isPost ---
};
ConjRS = conjunctDistrTable GenNum;
@@ -72,18 +73,18 @@ concrete ConjunctionPol of Conjunction =
}
};
BaseAP ap1 ap2 = { ap1=ap1; ap2=ap2 };
BaseAP ap1 ap2 = { ap1=ap1; ap2=ap2 ; isPost = ap2.isPost};
ConsAP ap apl = { ap2=apl.ap2; ap1={
s = \\af=> ap.s!af ++ "," ++ apl.ap1.s!af;
adv = ap.adv ++ "," ++ apl.ap1.adv
} };
adv = ap.adv ++ "," ++ apl.ap1.adv ; isPost = apl.isPost
} ; isPost = apl.isPost};
lincat
[S] = {s1,s2 : Str} ;
[Adv] = {s1,s2 : Str} ;
[NP] = {np1,np2 : NounPhrase} ;
[AP] = {ap1,ap2 : AdjPhrase} ;
[AP] = {ap1,ap2 : AdjPhrase ; isPost : Bool} ;
[RS] = {s1,s2 : GenNum => Str} ;
}

View File

@@ -54,7 +54,10 @@ concrete NounPol of Noun = CatPol ** open ResPol, Prelude, PronounMorphoPol, Mor
};
AdjCN mily facet = {
s = \\n,c => (mily.s ! AF (cast_gennum!<facet.g,n>) c) ++ (facet.s ! n ! c);
s = \\n,c => case mily.isPost of {
True => (facet.s ! n ! c) ++ (mily.s ! AF (cast_gennum!<facet.g,n>) c) ;
_ => (mily.s ! AF (cast_gennum!<facet.g,n>) c) ++ (facet.s ! n ! c)
} ;
g = facet.g
};

View File

@@ -174,7 +174,7 @@
param AForm = AF GenNum Case;
oper AdjPhrase = { s : AForm => Str; adv:Str };
oper AdjPhrase = { s : AForm => Str; adv:Str ; isPost : Bool };
--4 Pronoun