diff --git a/src/basque/ExtendEus.gf b/src/basque/ExtendEus.gf new file mode 100644 index 000000000..52c6a6fa6 --- /dev/null +++ b/src/basque/ExtendEus.gf @@ -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 + } ; + \ No newline at end of file diff --git a/src/basque/IdiomEus.gf b/src/basque/IdiomEus.gf index 032b03cc2..16d586413 100644 --- a/src/basque/IdiomEus.gf +++ b/src/basque/IdiomEus.gf @@ -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 - - ExistNP : NP -> Cl ; -- there is a house - ExistIP : IP -> QCl ; -- which houses are there + -} + -- : NP -> Cl ; -- there is a house + ExistNP np = let vp = UseComp (CompNP np) + in clFromVP empty_NP vp ; + +{- ExistIP : IP -> QCl ; -- which houses are there -- 7/12/2012 generalizations of these diff --git a/src/basque/MissingEus.gf b/src/basque/MissingEus.gf index 93e670fcd..425317b9a 100644 --- a/src/basque/MissingEus.gf +++ b/src/basque/MissingEus.gf @@ -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" ; diff --git a/src/basque/ParadigmsEus.gf b/src/basque/ParadigmsEus.gf index ba3c29971..4bbce1da0 100644 --- a/src/basque/ParadigmsEus.gf +++ b/src/basque/ParadigmsEus.gf @@ -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 diff --git a/src/persian/ResPes.gf b/src/persian/ResPes.gf index 893ca257c..e32b9a0b4 100644 --- a/src/persian/ResPes.gf +++ b/src/persian/ResPes.gf @@ -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 -> { => 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 - => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ; - => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed => vp.s ! VPTense Neg (VPPast Anter) (AgPes n p) ; => case vp.wish of {True => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ; @@ -342,11 +342,17 @@ mkSlClause : NP -> VPH -> SlClause = \np,vp -> { => 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 + + => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ; + => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed + => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ; - => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) -- verb form to be confirmed - + => 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,8 +394,10 @@ 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 => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ; - => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) -- verb form to be confirmed - + => 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 diff --git a/src/polish/AdjectivePol.gf b/src/polish/AdjectivePol.gf index 761effb4c..f9157deec 100644 --- a/src/polish/AdjectivePol.gf +++ b/src/polish/AdjectivePol.gf @@ -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}; }; diff --git a/src/polish/ConjunctionPol.gf b/src/polish/ConjunctionPol.gf index 8bc4d7ebb..773aabbff 100644 --- a/src/polish/ConjunctionPol.gf +++ b/src/polish/ConjunctionPol.gf @@ -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} ; } diff --git a/src/polish/NounPol.gf b/src/polish/NounPol.gf index 1f330645e..103bbe355 100644 --- a/src/polish/NounPol.gf +++ b/src/polish/NounPol.gf @@ -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!) c) ++ (facet.s ! n ! c); + s = \\n,c => case mily.isPost of { + True => (facet.s ! n ! c) ++ (mily.s ! AF (cast_gennum!) c) ; + _ => (mily.s ! AF (cast_gennum!) c) ++ (facet.s ! n ! c) + } ; g = facet.g }; diff --git a/src/polish/ResPol.gf b/src/polish/ResPol.gf index 6544a79cc..925d61df7 100644 --- a/src/polish/ResPol.gf +++ b/src/polish/ResPol.gf @@ -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