diff --git a/.travis.yml b/.travis.yml index 61646531..177f310c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: c os: - linux - osx - - windows +# - windows addons: apt: diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index 718ffdac..a3b49a63 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -193,6 +193,9 @@ abstract Extend = Cat ** { Cons_nr_RNP : NP -> RNPList -> RNPList ; -- John, my family, myself ---- Cons_rn_RNP : RNP -> ListNP -> RNPList ; -- myself, John, Mary +-- reflexive possessive on its own right, like in Swedish, Czech, Slovak + + ReflPossPron : Quant ; -- Swe sin,sitt,sina --- from Extensions diff --git a/src/common/ExtendFunctor.gf b/src/common/ExtendFunctor.gf index 73847677..a8018891 100644 --- a/src/common/ExtendFunctor.gf +++ b/src/common/ExtendFunctor.gf @@ -79,6 +79,7 @@ lin Base_rn_RNP = variants {} ; -- RNP -> NP -> RNPList ; -- myself, John Cons_rr_RNP = variants {} ; -- RNP -> RNPList -> RNPList ; -- my family, myself, John Cons_nr_RNP = variants {} ; -- NP -> RNPList -> RNPList ; -- John, my family, myself + ReflPossPron = PossPron he_Pron ; -- : Quant ; -- Swe sin,sitt,sina ComplGenVV = variants {} ; -- VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept ComplSlashPartLast = ComplSlash ; --SlashV2V = variants {} ; -- V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept diff --git a/src/czech/AllCze.gf b/src/czech/AllCze.gf index a27d206b..6d25b824 100644 --- a/src/czech/AllCze.gf +++ b/src/czech/AllCze.gf @@ -1,6 +1,7 @@ --# -path=.:../abstract:../common:../api concrete AllCze of AllCzeAbs = - LangCze + LangCze, + ExtendCze ; diff --git a/src/czech/AllCzeAbs.gf b/src/czech/AllCzeAbs.gf index 193edeb0..a18b6447 100644 --- a/src/czech/AllCzeAbs.gf +++ b/src/czech/AllCzeAbs.gf @@ -1,6 +1,7 @@ --# -path=.:../abstract:../common:prelude abstract AllCzeAbs = - Lang + Lang, + Extend ; diff --git a/src/czech/CatCze.gf b/src/czech/CatCze.gf index 9d21cd1e..31f01a73 100644 --- a/src/czech/CatCze.gf +++ b/src/czech/CatCze.gf @@ -24,6 +24,7 @@ concrete CatCze of Cat = VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ---- V = ResCze.VerbForms ; V2 = ResCze.VerbForms ** {c : ComplementCase} ; + VS,VQ = ResCze.VerbForms ; A = ResCze.AdjForms ; AP = ResCze.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str} diff --git a/src/czech/ExtendCze.gf b/src/czech/ExtendCze.gf new file mode 100644 index 00000000..12659f69 --- /dev/null +++ b/src/czech/ExtendCze.gf @@ -0,0 +1,38 @@ +concrete ExtendCze of Extend = CatCze ** + ExtendFunctor - [ + ReflPossPron + ---- constant not found (yet) + ,youPolFem_Pron + ,UttVPShort + ,UttAccIP + ,UttDatIP + ,SubjRelNP + ,StrandRelSlash + ,StrandQuestSlash + ,SlashBareV2S + ,PredIAdvVP + ,PredAPVP + ,ExistsNP + ,ExistS + ,ExistPluralCN + ,ExistNPQS + ,ExistMassCN + ,ExistIPQS + ,ExistCN + ,EmptyRelSlash + ,DetNPMasc + ,DetNPFem + ,ComplBareVS + ,CompIQuant + ,CompBareCN + ] + with (Grammar = GrammarCze) + ** +open + ResCze +in { + +lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ; + + +} \ No newline at end of file diff --git a/src/czech/ResCze.gf b/src/czech/ResCze.gf index 5f2d0e46..8e6558cc 100644 --- a/src/czech/ResCze.gf +++ b/src/czech/ResCze.gf @@ -632,8 +632,6 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> { a : Agr } ; ----- TODO: possessives - personalPron : Agr -> PronForms = \a -> {a = a ; cnom = []} ** case a of { @@ -753,6 +751,7 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> { } ; + reflPossessivePron : DemPronForms = mladyAdjForms "svy" ** {msnom = "svůj" ; pdat = "svým"} ; mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a -> personalPron a ** {poss = possessivePron a} ; diff --git a/src/czech/StructuralCze.gf b/src/czech/StructuralCze.gf index 09580294..ef14b1a2 100644 --- a/src/czech/StructuralCze.gf +++ b/src/czech/StructuralCze.gf @@ -23,6 +23,7 @@ lin youSg_Pron = mkPron (Ag (Masc Anim) Sg P2) ; he_Pron = mkPron (Ag (Masc Anim) Sg P3) ; she_Pron = mkPron (Ag Fem Sg P3) ; + it_Pron = mkPron (Ag Neutr Sg P3) ; we_Pron = mkPron (Ag (Masc Anim) Pl P1) ; youPl_Pron = mkPron (Ag (Masc Anim) Pl P2) ; they_Pron = mkPron (Ag (Masc Anim) Pl P3) ; diff --git a/src/english/ParadigmsEng.gf b/src/english/ParadigmsEng.gf index 57d623b6..1ba055c2 100644 --- a/src/english/ParadigmsEng.gf +++ b/src/english/ParadigmsEng.gf @@ -412,7 +412,15 @@ mkInterj : Str -> Interj compoundN s n = lin N {s = \\x,y => s ++ n.s ! x ! y ; g=n.g} ; - verbalN v = regN (v.s ! VPresPart) ; + -- NB. this only works when constructing lexicon, not applied to runtime arguments + verbalN v = + let switching : Str = v.s ! VPresPart ; + on : Str = v.p ; + in particleN (regN switching) on ; + + particleN : N -> Str -> N = \n,str -> n ** { + s = \\num,cas => n.s ! num ! cas ++ str + } ; mkPN = overload { mkPN : Str -> PN = regPN ; diff --git a/src/hungarian/NounHun.gf b/src/hungarian/NounHun.gf index 841630cb..7021a900 100644 --- a/src/hungarian/NounHun.gf +++ b/src/hungarian/NounHun.gf @@ -99,14 +99,13 @@ concrete NounHun of Noun = CatHun ** open quant ** num ** { s = \\c => case of { => [] ; -- don't output "a 2 cars" - _ => quant.s ! n ! c } + _ => quant.s ! n ! c } -- az/azok a … ++ num.s ! Attrib ; -- TODO: add inflection table in numbers sp = \\c => case of { => [] ; - _ => quant.sp ! n ! c } + _ => quant.sp ! n ! c } -- az/azok … ++ num.s ! Indep ; n = n ; - dt = qt2dt quant.qt ; } ; -- : Quant -> Num -> Ord -> Det ; -- these five best @@ -170,20 +169,20 @@ concrete NounHun of Noun = CatHun ** open DefArt = mkQuant "a" "a" ** { s, sp = \\_,_ => pre {"a" ; "az" / v } ; - qt = DefQuant ; + dt = DefDet ; } ; -- : Quant IndefArt = mkQuant "egy" [] ** { s = \\n,_ => case n of {Sg => "egy" ; Pl => []} ; sp = \\n,_ => case n of {Sg => "egy" ; Pl => "sok"} ; - qt = IndefArticle ; + dt = IndefDet ; } ; -- : Pron -> Quant PossPron pron = pron ** { s,sp = \\_ => pron.s ; - qt = QuantPoss (agr2pstem pron.agr) ; + dt = DetPoss (agr2pstem pron.agr) ; caseagr = False ; } ; diff --git a/src/hungarian/ParamHun.gf b/src/hungarian/ParamHun.gf index d62a94cb..b884185f 100644 --- a/src/hungarian/ParamHun.gf +++ b/src/hungarian/ParamHun.gf @@ -17,17 +17,11 @@ oper -- Quant param - QuantType = - IndefArticle -- Needed to prevent "a 2 cars" - | IndefQuant -- Not IndefArt, not poss, not def - | DefQuant - | QuantPoss PossStem -- Which possessive stem it takes - ; DetType = - DefDet -- distinction between Article and Other no longer needed - | IndefDet -- still need def or indef - | DetPoss PossStem -- Sill need to know which stem it takes if Poss + DefDet + | IndefDet -- Def or Indef relevant for verb agreement + | DetPoss PossStem -- Which possessive stem it takes ; -- Singular stems. Plural is always same, no need to add here. @@ -35,10 +29,10 @@ param oper -- standard trick to prevent "a one car" - isIndefArt : {qt : QuantType} -> Bool = \quant -> - case quant.qt of { - IndefArticle => True ; - _ => False + isIndefArt : {dt : DetType} -> Bool = \quant -> + case quant.dt of { + IndefDet => True ; + _ => False } ; dt2objdef : DetType -> ObjDef = \dt -> case dt of { @@ -51,12 +45,6 @@ oper Indef => IndefDet } ; - qt2dt : QuantType -> DetType = \qt -> case qt of { - QuantPoss x => DetPoss x ; - DefQuant => DefDet ; - _ => IndefDet - } ; - agr2pstem : Person*Number -> PossStem = \pn -> case of { => dSg_rPl1 ; diff --git a/src/hungarian/ResHun.gf b/src/hungarian/ResHun.gf index 21ecd7ba..7d354aef 100644 --- a/src/hungarian/ResHun.gf +++ b/src/hungarian/ResHun.gf @@ -203,13 +203,13 @@ oper Quant : Type = BaseQuant ** { s, -- form that comes before noun: "{this} car" sp : Number => Case => Str ; -- independent form, "I like {this}" (DetNP) - qt : QuantType ; + dt : DetType ; } ; mkQuant : (s,sp : Str) -> Quant = \s,sp -> { s = mkCaseNoun s ; sp = mkCaseNoun sp ; - qt = DefQuant ; + dt = DefDet ; caseagr = True ; poss = harm1 [] ; } ; diff --git a/src/slovak/AllSlo.gf b/src/slovak/AllSlo.gf index 021062da..19a21153 100644 --- a/src/slovak/AllSlo.gf +++ b/src/slovak/AllSlo.gf @@ -1,6 +1,7 @@ --# -path=.:../abstract:../common:../api concrete AllSlo of AllSloAbs = - LangSlo + LangSlo, + ExtendSlo ; diff --git a/src/slovak/AllSloAbs.gf b/src/slovak/AllSloAbs.gf index f7eaf683..4c6ef0a6 100644 --- a/src/slovak/AllSloAbs.gf +++ b/src/slovak/AllSloAbs.gf @@ -1,6 +1,7 @@ --# -path=.:../abstract:../common:prelude abstract AllSloAbs = - Lang + Lang, + Extend ; diff --git a/src/slovak/CatSlo.gf b/src/slovak/CatSlo.gf index 7a5e31f4..bc5b6be9 100644 --- a/src/slovak/CatSlo.gf +++ b/src/slovak/CatSlo.gf @@ -24,6 +24,7 @@ concrete CatSlo of Cat = VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ---- V = ResSlo.VerbForms ; V2 = ResSlo.VerbForms ** {c : ComplementCase} ; + VS,VQ = ResSlo.VerbForms ; A = ResSlo.AdjForms ; AP = ResSlo.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str} diff --git a/src/slovak/ExtendSlo.gf b/src/slovak/ExtendSlo.gf new file mode 100644 index 00000000..c5ff3c5f --- /dev/null +++ b/src/slovak/ExtendSlo.gf @@ -0,0 +1,38 @@ +concrete ExtendSlo of Extend = CatSlo ** + ExtendFunctor - [ + ReflPossPron + ---- constant not found (yet) + ,youPolFem_Pron + ,UttVPShort + ,UttAccIP + ,UttDatIP + ,SubjRelNP + ,StrandRelSlash + ,StrandQuestSlash + ,SlashBareV2S + ,PredIAdvVP + ,PredAPVP + ,ExistsNP + ,ExistS + ,ExistPluralCN + ,ExistNPQS + ,ExistMassCN + ,ExistIPQS + ,ExistCN + ,EmptyRelSlash + ,DetNPMasc + ,DetNPFem + ,ComplBareVS + ,CompIQuant + ,CompBareCN + ] + with (Grammar = GrammarSlo) + ** +open + ResSlo +in { + +lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ; + + +} \ No newline at end of file diff --git a/src/slovak/ResSlo.gf b/src/slovak/ResSlo.gf index bfb16f97..ba5f59f1 100644 --- a/src/slovak/ResSlo.gf +++ b/src/slovak/ResSlo.gf @@ -869,6 +869,15 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> { } ; + reflPossessivePron : DemPronForms = otcovA "svoj" ** { + msnom = "svoj" ; msgen = "svojho" ; msdat = "svojmu" ; + msins = "svojím" ; + ampnom = "svoji" ; + nsnom, fpnom = "svoje" ; + pgen = "svojich" ; + pdat = "svojim" ; + pins = "svojimi" ; + } ; mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a -> personalPron a ** {poss = possessivePron a} ; diff --git a/src/slovak/StructuralSlo.gf b/src/slovak/StructuralSlo.gf index 14f9c9ce..c89e1832 100644 --- a/src/slovak/StructuralSlo.gf +++ b/src/slovak/StructuralSlo.gf @@ -24,6 +24,7 @@ lin youSg_Pron = mkPron (Ag (Masc Anim) Sg P2) ; he_Pron = mkPron (Ag (Masc Anim) Sg P3) ; she_Pron = mkPron (Ag Fem Sg P3) ; + it_Pron = mkPron (Ag Neutr Sg P3) ; we_Pron = mkPron (Ag (Masc Anim) Pl P1) ; youPl_Pron = mkPron (Ag (Masc Anim) Pl P2) ; they_Pron = mkPron (Ag (Masc Anim) Pl P3) ; diff --git a/src/swedish/ExtendSwe.gf b/src/swedish/ExtendSwe.gf index 214d6335..813468fb 100644 --- a/src/swedish/ExtendSwe.gf +++ b/src/swedish/ExtendSwe.gf @@ -12,14 +12,16 @@ concrete ExtendSwe of Extend = CatSwe ** ICompAP,ProDrop,EmbedSSlash, AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP, RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP, - Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, + Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, ReflPossPron, CompoundN, CompoundAP, AdvIsNP, UttAccNP ] with (Grammar = GrammarSwe) ** open CommonScand, ResSwe, ParamX, VerbSwe, Prelude, DiffSwe, StructuralSwe, MorphoSwe, - NounSwe, Coordination, AdjectiveSwe, SentenceSwe, AdverbSwe, RelativeSwe, (P = ParadigmsSwe) in { + NounSwe, Coordination, AdjectiveSwe, SentenceSwe, AdverbSwe, RelativeSwe, (P = ParadigmsSwe), + (M = MakeStructuralSwe) +in { flags coding=utf8 ; @@ -207,6 +209,8 @@ concrete ExtendSwe of Extend = CatSwe ** Cons_rr_RNP x xs = consrTable Agr comma x xs ; Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ; + ReflPossPron = M.mkQuant "sin" "sitt" "sina" ; + lin ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ;