diff --git a/src/slovenian/AdjectiveSlv.gf b/src/slovenian/AdjectiveSlv.gf index f94bd37b..ae208d39 100644 --- a/src/slovenian/AdjectiveSlv.gf +++ b/src/slovenian/AdjectiveSlv.gf @@ -23,4 +23,12 @@ concrete AdjectiveSlv of Adjective = CatSlv ** open ResSlv in { } ; AdvAP ap adv = {s = \\spec,g,c,n => ap.s ! spec ! g ! c ! n ++ adv.s} ; + ComplA2 a np = { + s = \\spec,g,c,n => a.s ! APosit (agender2gender g) n c ++ a.c.s ++ np.s ! a.c.c + } ; + UseA2 a = {s = \\_,g,c,n => a.s ! APosit (agender2gender g) n c} ; + SentAP ap sc = ap ** {s = \\sp,g,c,n => ap.s ! sp ! g ! c ! n ++ sc.s} ; + ComparA a np = { + s = \\_,g,c,n => a.s ! ACompar (agender2gender g) n c ++ "kot" ++ np.s ! Nom + } ; } diff --git a/src/slovenian/AdverbSlv.gf b/src/slovenian/AdverbSlv.gf index 6fc95c8b..bac4ca9d 100644 --- a/src/slovenian/AdverbSlv.gf +++ b/src/slovenian/AdverbSlv.gf @@ -2,5 +2,9 @@ concrete AdverbSlv of Adverb = CatSlv ** open ResSlv in { lin PrepNP prep np = {s = prep.s ++ np.s ! prep.c} ; + PositAdvAdj a = {s = a.s ! APosit Neut Sg Nom} ; + PositAdAAdj a = {s = a.s ! APosit Neut Sg Nom} ; + AdAdv ada adv = {s = ada.s ++ adv.s} ; + SubjS subj s = {s = subj.s ++ s.s} ; } diff --git a/src/slovenian/CatSlv.gf b/src/slovenian/CatSlv.gf index 41285bb5..8e593fd4 100644 --- a/src/slovenian/CatSlv.gf +++ b/src/slovenian/CatSlv.gf @@ -3,12 +3,19 @@ concrete CatSlv of Cat = CommonX ** open ResSlv, (P=ParamX), Prelude in { lincat -- Sentence Cl = {s : P.Tense => P.Anteriority => P.Polarity => Str} ; + S, QS, SSlash = {s : Str} ; Imp = {s : P.Polarity => Gender => Number => Str} ; ClSlash = {s : P.Tense => P.Anteriority => P.Polarity => Str ; c2 : Prep} ; ----AR -- Question QCl = {s : P.Tense => P.Anteriority => P.Polarity => Str} ; IP = {s : Case => Str; a : Agr} ; ----AR + IComp = {s : Str} ; + IDet, IQuant = {s : Str} ; + + RCl = {s : Agr => P.Tense => P.Anteriority => P.Polarity => Str} ; + RS = {s : Agr => Str} ; + RP = {s : AGender => Case => Number => Str} ; -- Verb VP = ResSlv.VP ; @@ -25,9 +32,13 @@ lincat Pron = {s : Case => Str; poss : Gender => Case => Number => Str; a : Agr} ; Det = {s : Gender => Case => Str; spec : Species; n : NumAgr} ; + Predet = {s : Str} ; Num = {s : Gender => Case => Str ; n : NumAgr} ; Card = {s : Gender => Case => Str ; n : NumAgr} ; Quant = {s : Gender => Case => Number => Str; spec : Species} ; + Ord = {s : Gender => Case => Number => Str} ; + DAP = {s : Species => AGender => Case => Number => Str; n : NumAgr} ; + ACard = {s : Str} ; -- Numeral Numeral = {s : Gender => Case => Str ; n : NumAgr} ; diff --git a/src/slovenian/ConjunctionSlv.gf b/src/slovenian/ConjunctionSlv.gf index 7e53426c..e55054c7 100644 --- a/src/slovenian/ConjunctionSlv.gf +++ b/src/slovenian/ConjunctionSlv.gf @@ -42,10 +42,17 @@ concrete ConjunctionSlv of Conjunction = s2 = xs.s2 ; g = xs.g } ; + ConjS conj xs = {s=xs.s1++conj.s++xs.s2} ; + BaseS a b = {s1=a.s;s2=b.s} ; + ConsS a xs = {s1=a.s++","++xs.s1;s2=xs.s2} ; + ConjAdv conj xs = {s=xs.s1++conj.s++xs.s2} ; + BaseAdv a b = {s1=a.s;s2=b.s} ; + ConsAdv a xs = {s1=a.s++","++xs.s1;s2=xs.s2} ; lincat [NP] = {s1,s2 : Case => Str; a : Agr} ; [AP] = {s1,s2 : Species => AGender => Case => Number => Str} ; [CN] = {s1,s2 : Species => Case => Number => Str; g : AGender} ; + [S], [Adv] = {s1,s2 : Str} ; } diff --git a/src/slovenian/ConstructionSlv.gf b/src/slovenian/ConstructionSlv.gf index 4240eca1..51e96e01 100644 --- a/src/slovenian/ConstructionSlv.gf +++ b/src/slovenian/ConstructionSlv.gf @@ -1,16 +1,25 @@ concrete ConstructionSlv of Construction = CatSlv ** - open ParadigmsSlv, ResSlv in { + open ParadigmsSlv, ResSlv, Prelude in { flags coding=utf8; lincat Weekday = N ; - Month = N ; + Month = N ; + Year, Monthday = {s : Str} ; lin weekdayN w = w ; monthN m = m ; + ready_VP = {s=copula;s2=\\a=>(mkA "pripravljen").s!APosit a.g a.n Nom;isCop=True;refl=[]} ; + has_age_VP card = {s=copula;s2=\\a=>card.s!Masc!Nom++"let star";isCop=True;refl=[]} ; + yearAdv y = {s="leta"++y.s} ; + intYear i = {s=i.s} ; + intMonthday i = {s=i.s} ; + cup_of_CN np = {s=\\_,c,n=>(mkN "skodelica").s!c!n++np.s!Gen;g=AFem} ; + n_units_AP card unit adj = {s=\\_,g,c,n=>card.s!(agender2gender g)!c++unit.s!Indef!Gen!Pl++adj.s!APosit(agender2gender g)n c} ; + n_units_of_NP card unit np = {s=\\c=>card.s!Masc!c++unit.s!Indef!Gen!Pl++np.s!Gen;a=np.a;isPron=False} ; lin monday_Weekday = mkN "ponedeljek" "ponedeljka" "ponedeljku" "ponedeljek" "ponedeljku" "ponedeljkom" "ponedeljka" "ponedeljkov" "ponedeljkoma" "ponedeljka" "ponedeljkih" "ponedeljkoma" "ponedeljki" "ponedeljkov" "ponedeljkom" "ponedeljke" "ponedeljkih" "ponedeljki" masculine ; diff --git a/src/slovenian/ExtendSlv.gf b/src/slovenian/ExtendSlv.gf index 0279663e..83e2a67b 100644 --- a/src/slovenian/ExtendSlv.gf +++ b/src/slovenian/ExtendSlv.gf @@ -1,9 +1,99 @@ --# -path=.:../abstract:../common:prelude -concrete ExtendSlv of Extend = CatSlv ** open ResSlv, ParadigmsSlv, GrammarSlv in { +concrete ExtendSlv of Extend = CatSlv ** open ResSlv, ParadigmsSlv, GrammarSlv, (P=ParamX), Prelude in { + +lincat + VPS = {s : Agr => Str} ; + [VPS] = {s1,s2 : Agr => Str} ; + VPI = {s : Agr => Str} ; + [VPI] = {s1,s2 : Agr => Str} ; + VPS2 = VPSlash ; + [VPS2] = {s1,s2 : Agr => Str; c2 : Prep} ; + VPI2 = VPSlash ; + [VPI2] = {s1,s2 : Agr => Str; c2 : Prep} ; + [Comp] = {s1,s2 : Agr => Str} ; + [Imp] = {s1,s2 : P.Polarity => Gender => Number => Str} ; + RNP = {s : Agr => Case => Str} ; + RNPList = {s1,s2 : Agr => Case => Str} ; lin UttAdV adv = {s = adv.s} ; + GenModNP num np cn = { + s = \\c => np.s ! Gen ++ cn.s ! Indef ! c ! (numAgr2num ! num.n); + a={g=agender2gender cn.g;n=numAgr2num ! num.n;p=P3}; isPron=False + } ; + CompBareCN cn = {s = \\a => cn.s ! Indef ! Nom ! a.n} ; + EmptyRelSlash cl = {s=\\_,t,a,p => cl.s!t!a!p} ; + + MkVPS t p vp = {s = \\a => predV False vp.isCop vp.refl vp.s ! t.t ! p.p ! a ++ vp.s2 ! a} ; + BaseVPS x y = {s1=x.s;s2=y.s} ; + ConsVPS x xs = {s1=\\a => x.s ! a ++ "," ++ xs.s1 ! a;s2=xs.s2} ; + ConjVPS conj xs = {s=\\a => xs.s1 ! a ++ conj.s ++ xs.s2 ! a} ; + PredVPS np vps = {s=np.s ! Nom ++ vps.s ! np.a} ; + SQuestVPS np vps = {s=np.s ! Nom ++ vps.s ! np.a} ; + QuestVPS ip vps = {s=ip.s ! Nom ++ vps.s ! ip.a} ; + RelVPS rp vps = {s=\\a => rp.s ! inanimateGender a.g ! Nom ! a.n ++ vps.s ! a} ; + + MkVPI vp = {s=\\a => vp.s ! P.Pos ! VInf ++ vp.refl ++ vp.s2 ! a} ; + BaseVPI x y = {s1=x.s;s2=y.s} ; + ConsVPI x xs = {s1=\\a => x.s ! a ++ "," ++ xs.s1 ! a;s2=xs.s2} ; + ConjVPI conj xs = {s=\\a => xs.s1 ! a ++ conj.s ++ xs.s2 ! a} ; + ComplVPIVV vv vpi = { + s=\\p,vf => ne ! p ++ vv.s ! vf;s2=\\a => vpi.s ! a;isCop=False;refl=[] + } ; + + PresPartAP vp = {s=\\_,g,c,n => vp.s ! P.Pos ! VPastPart (agender2gender g) n ++ vp.s2 ! {g=agender2gender g;n=n;p=P3}} ; + PastPartAP vp = {s=\\_,g,_,n => vp.s ! P.Pos ! VPastPart (agender2gender g) n ++ vp.s2 ! {g=agender2gender g;n=n;p=P3}} ; + PastPartAgentAP vp np = {s=\\_,g,_,n => vp.s ! P.Pos ! VPastPart (agender2gender g) n ++ vp.s2 ! {g=agender2gender g;n=n;p=P3} ++ "od" ++ np.s ! Gen} ; + PassVPSlash vp = {s=copula;s2=\\a => vp.s ! P.Pos ! VPastPart a.g a.n ++ vp.s2 ! a;isCop=True;refl=[]} ; + PassAgentVPSlash vp np = {s=copula;s2=\\a => vp.s ! P.Pos ! VPastPart a.g a.n ++ vp.s2 ! a ++ "od" ++ np.s ! Gen;isCop=True;refl=[]} ; + ProgrVPSlash vp = vp ; + + ComplBareVS v s = {s=\\p,vf => ne ! p ++ v.s ! vf;s2=\\_ => v.p ++ s.s;isCop=False;refl=v.refl} ; + ComplSlashPartLast vp np = ComplSlash vp np ; + UttVPShort vp = {s=vp.s ! P.Pos ! VImper2 Sg ++ vp.s2 ! {g=Masc;n=Sg;p=P2}} ; + + CompoundN a b = b ** {s=\\c,n => b.s ! c ! n ++ a.s ! Gen ! Sg} ; + CompoundAP n a = {s=\\_,g,c,num => n.s ! Instr ! Sg ++ a.s ! APosit (agender2gender g) num c} ; + GerundCN vp = {s=\\_,_,_ => vp.s ! P.Pos ! VInf ++ vp.s2 ! {g=Neut;n=Sg;p=P3};g=ANeut} ; + GerundNP vp = {s=\\_ => vp.s ! P.Pos ! VInf ++ vp.s2 ! {g=Neut;n=Sg;p=P3};a={g=Neut;n=Sg;p=P3};isPron=False} ; + GerundAdv vp = {s=vp.s ! P.Pos ! VInf ++ vp.s2 ! {g=Neut;n=Sg;p=P3}} ; + ByVP vp = {s="z" ++ vp.s ! P.Pos ! VInf ++ vp.s2 ! {g=Neut;n=Sg;p=P3}} ; + InOrderToVP vp = {s="da bi" ++ vp.s ! P.Pos ! VInf ++ vp.s2 ! {g=Neut;n=Sg;p=P3}} ; + ApposNP a b = a ** {s=\\c => a.s ! c ++ "," ++ b.s ! c} ; + PositAdVAdj a = {s=a.s ! APosit Neut Sg Nom} ; + + ReflPron = {s=\\_,c => reflexive ! c} ; + ReflPoss num cn = {s=\\a,c => (mkA "svoj").s ! APosit a.g (numAgr2num ! num.n) c ++ cn.s ! Indef ! c ! (numAgr2num ! num.n)} ; + PredetRNP pred r = {s=\\a,c => pred.s ++ r.s ! a ! c} ; + AdvRNP np prep r = {s=\\a,c => np.s ! c ++ prep.s ++ r.s ! a ! prep.c} ; + AdvRVP vp prep r = vp ** {s2=\\a => vp.s2 ! a ++ prep.s ++ r.s ! a ! prep.c} ; + AdvRAP ap prep r = ap ** {s=\\sp,g,c,n => ap.s ! sp ! g ! c ! n ++ prep.s ++ r.s ! {g=agender2gender g;n=n;p=P3} ! prep.c} ; + PossPronRNP pron num cn r = { + s=\\c => pron.poss ! agender2gender cn.g ! c ! (numAgr2num ! num.n) ++ cn.s ! Indef ! c ! (numAgr2num ! num.n) ++ r.s ! pron.a ! Gen; + a={g=agender2gender cn.g;n=numAgr2num ! num.n;p=P3};isPron=False + } ; + Base_rr_RNP a b = {s1=a.s;s2=b.s} ; + Base_nr_RNP a b = {s1=\\_,c=>a.s!c;s2=b.s} ; + Base_rn_RNP a b = {s1=a.s;s2=\\_,c=>b.s!c} ; + Cons_rr_RNP a xs = {s1=\\x,c=>a.s!x!c++","++xs.s1!x!c;s2=xs.s2} ; + Cons_nr_RNP a xs = {s1=\\x,c=>a.s!c++","++xs.s1!x!c;s2=xs.s2} ; + ConjRNP conj xs = {s=\\a,c => xs.s1!a!c ++ conj.s ++ xs.s2!a!c} ; + + UseDAP dap = {s=\\c=>dap.s!Indef!(AMasc Inanimate)!c!(numAgr2num!dap.n);a={g=Masc;n=numAgr2num!dap.n;p=P3};isPron=False} ; + UseDAPMasc dap = UseDAP dap ; + UseDAPFem dap = {s=\\c=>dap.s!Indef!AFem!c!(numAgr2num!dap.n);a={g=Fem;n=numAgr2num!dap.n;p=P3};isPron=False} ; + + CompS s = {s=\\_=>s.s} ; + CompQS s = {s=\\_=>s.s} ; + CompVP ant pol vp = {s=\\a=>vp.s!pol.p!VInf++vp.s2!a} ; + ConjImp conj xs = {s=\\p,g,n=>xs.s1!p!g!n++conj.s++xs.s2!p!g!n} ; + BaseImp a b = {s1=a.s;s2=b.s} ; + ConsImp a xs = {s1=\\p,g,n=>a.s!p!g!n++","++xs.s1!p!g!n;s2=xs.s2} ; + ConjComp conj xs = {s=\\a=>xs.s1!a++conj.s++xs.s2!a} ; + BaseComp a b = {s1=a.s;s2=b.s} ; + ConsComp a xs = {s1=\\x=>a.s!x++","++xs.s1!x;s2=xs.s2} ; + iFem_Pron = mkPron "jàz" "méne" "méne" "méni" "méni" ("menój"|"máno") "mój" "mòjega" "mòjemu" ("mòj"|"mòjega") "mòjem" "mòjim" "mòja" "mòjih" "mòjima" "mòja" "mòjih" "mòjima" diff --git a/src/slovenian/GrammarSlv.gf b/src/slovenian/GrammarSlv.gf index 660891af..1919bfb2 100644 --- a/src/slovenian/GrammarSlv.gf +++ b/src/slovenian/GrammarSlv.gf @@ -8,7 +8,7 @@ concrete GrammarSlv of Grammar = NumeralSlv, SentenceSlv, QuestionSlv, -{- RelativeSlv,-} + RelativeSlv, ConjunctionSlv, PhraseSlv, TextX - [Pol,PPos,PNeg], diff --git a/src/slovenian/IdiomSlv.gf b/src/slovenian/IdiomSlv.gf index e2f9a819..73c26987 100644 --- a/src/slovenian/IdiomSlv.gf +++ b/src/slovenian/IdiomSlv.gf @@ -1,6 +1,6 @@ ----AR BEGIN the whole IdiomSlv concrete IdiomSlv of Idiom = CatSlv ** - open ParadigmsSlv, ResSlv, Prelude in { + open ParadigmsSlv, ResSlv, (P=ParamX), Prelude in { lin ExistNP np = @@ -11,7 +11,14 @@ concrete IdiomSlv of Idiom = CatSlv ** refl = [] } ; + ExistNPAdv np adv = mkClause [] np.a False { + s=copula; s2=\\_ => np.s ! Nom ++ adv.s; isCop=True; refl=[] + } ; + ImpersCl vp = mkClause [] {g=Neut;n=Sg;p=P3} False vp ; + ProgrVP vp = vp ; + ImpPl1 vp = {s = vp.s ! P.Pos ! VImper2 Pl ++ vp.s2 ! {g=Masc;n=Pl;p=P1}} ; + } -----AR END \ No newline at end of file +----AR END diff --git a/src/slovenian/NamesSlv.gf b/src/slovenian/NamesSlv.gf index 87493039..ea4e49b3 100644 --- a/src/slovenian/NamesSlv.gf +++ b/src/slovenian/NamesSlv.gf @@ -31,4 +31,8 @@ lin InLN ln = { s = "v" ++ ln.s ! Loc } ; +lin AdjLN ap ln = ln ** { + s = \\c => ap.s ! Indef ! ln.g ! c ! ln.n ++ ln.s ! c + } ; + } diff --git a/src/slovenian/NounSlv.gf b/src/slovenian/NounSlv.gf index c9e992aa..7e3fdd21 100644 --- a/src/slovenian/NounSlv.gf +++ b/src/slovenian/NounSlv.gf @@ -35,12 +35,26 @@ concrete NounSlv of Noun = CatSlv ** open ResSlv,Prelude in { isPron = False -- KA: guessed } ; + PredetNP pred np = np ** { + s = \\c => pred.s ++ np.s ! c + } ; + + ExtAdvNP np adv = AdvNP np adv ; + + RelNP np rs = np ** {s = \\c => np.s ! c ++ "," ++ rs.s ! np.a} ; + DetQuant quant num = { s = \\g,c => quant.s ! g ! c ! (numAgr2num ! num.n) ++ num.s ! g ! c; spec = quant.spec ; n = num.n ; } ; + DetQuantOrd quant num ord = { + s = \\g,c => quant.s ! g ! c ! (numAgr2num ! num.n) ++ num.s ! g ! c ++ + ord.s ! g ! c ! (numAgr2num ! num.n) ; + spec = quant.spec ; n = num.n + } ; + DetNP det = { s = det.s ! Masc ; a = {g=Masc; n=case det.n of {UseNum n=>n; UseGen=>Pl}; p=P3} ; @@ -68,6 +82,15 @@ concrete NounSlv of Noun = CatSlv ** open ResSlv,Prelude in { n = decimal.n } ; + AdNum adn card = card ** {s = \\g,c => adn.s ++ card.s ! g ! c} ; + + OrdDigits digits = {s = \\_,_,_ => digits.s ++ BIND ++ "."} ; + OrdNumeral numeral = {s = \\g,c,_ => numeral.s ! g ! c} ; + OrdSuperl a = {s = \\g,c,n => "naj" ++ BIND ++ a.s ! APosit g n c} ; + OrdNumeralSuperl numeral a = { + s = \\g,c,n => numeral.s ! g ! c ++ "naj" ++ BIND ++ a.s ! APosit g n c + } ; + DefArt = { s = \\_,_,_ => "" ; spec = Def @@ -92,4 +115,37 @@ concrete NounSlv of Noun = CatSlv ** open ResSlv,Prelude in { } ; AdvCN cn ad = {s = \\spec,c,n => cn.s ! spec ! c ! n ++ ad.s ; g = cn.g} ; + ComplN2 n np = { + s = \\_,c,num => n.s ! c ! num ++ n.c.s ++ np.s ! n.c.c ; g = n.g + } ; + ComplN3 n np = n ** {s = \\c,num => n.s ! c ! num ++ n.c.s ++ np.s ! n.c.c} ; + UseN2 n = {s = \\_ => n.s; g = n.g} ; + Use2N3 n = n ; + Use3N3 n = n ; + + RelCN cn rs = cn ** { + s = \\sp,c,n => cn.s ! sp ! c ! n ++ rs.s ! {g=agender2gender cn.g;n=n;p=P3} + } ; + SentCN cn sc = cn ** {s = \\sp,c,n => cn.s ! sp ! c ! n ++ sc.s} ; + ApposCN cn np = cn ** {s = \\sp,c,n => cn.s ! sp ! c ! n ++ np.s ! c} ; + PossNP cn np = cn ** {s = \\sp,c,n => cn.s ! sp ! c ! n ++ np.s ! Gen} ; + PartNP cn np = cn ** {s = \\sp,c,n => cn.s ! sp ! c ! n ++ "od" ++ np.s ! Gen} ; + + CountNP det np = { + s = \\c => det.s ! np.a.g ! c ++ "od" ++ np.s ! Gen ; + a = {g=np.a.g;n=numAgr2num ! det.n;p=P3}; isPron=False + } ; + + DetDAP det = { + s = \\_,g,c,_ => det.s ! agender2gender g ! c; n = det.n + } ; + AdjDAP dap ap = dap ** { + s = \\sp,g,c,n => dap.s ! sp ! g ! c ! n ++ ap.s ! sp ! g ! c ! n + } ; + + QuantityNP decimal mu = { + s = \\_ => decimal.s ++ mu.s; + a = {g=Fem;n=numAgr2num ! decimal.n;p=P3}; isPron=False + } ; + } diff --git a/src/slovenian/NumeralSlv.gf b/src/slovenian/NumeralSlv.gf index c805aeae..6b803414 100644 --- a/src/slovenian/NumeralSlv.gf +++ b/src/slovenian/NumeralSlv.gf @@ -146,7 +146,13 @@ lin pot110 = {s=\\g => table { } ; pot3as4 x = x ; + pot41 = {s=\\_,_=>"milijon";n=UseGen} ; + pot4 x = {s=\\g,c=>x.s!g!c++"milijonov";n=UseGen} ; + pot4plus x y = {s=\\g,c=>x.s!g!c++"milijonov"++y.s!g!c;n=UseGen} ; pot4as5 x = x ; + pot51 = {s=\\_,_=>"milijarda";n=UseGen} ; + pot5 x = {s=\\g,c=>x.s!g!c++"milijard";n=UseGen} ; + pot5plus x y = {s=\\g,c=>x.s!g!c++"milijard"++y.s!g!c;n=UseGen} ; oper mkDigit : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender => Case => Str; mkDigit nomMasc nomFem nomNeut accMasc accFem accNeut diff --git a/src/slovenian/ParadigmsSlv.gf b/src/slovenian/ParadigmsSlv.gf index 78a584af..39e3d234 100644 --- a/src/slovenian/ParadigmsSlv.gf +++ b/src/slovenian/ParadigmsSlv.gf @@ -35,6 +35,9 @@ oper } ; compoundN = overload { + compoundN : A -> N -> N = \adj,noun -> noun ** { + s = \\c,n => adj.s ! APosit (agender2gender noun.g) n c ++ noun.s ! c ! n + } ; compoundN : N -> Str -> N = \noun,adv -> noun ** {s = \\c,n => noun.s ! c ! n ++ adv} ; } ; @@ -296,6 +299,13 @@ oper particleV : V -> Str -> V = \v,p -> v ** {p = p} ; + compoundV = overload { + compoundV : V -> Str -> V = \v,compl -> v ** {p = compl} ; + compoundV : Str -> V -> V = \compl,v -> v ** { + s = \\vf => compl ++ v.s ! vf + } ; + } ; + -- Regular verbs are formed from two forms. Infinitive and 3rd person singular presens. regV : (_,_ : Str) -> V = \hoditi,hodi -> diff --git a/src/slovenian/PhraseSlv.gf b/src/slovenian/PhraseSlv.gf index 404e5220..e347fe5d 100644 --- a/src/slovenian/PhraseSlv.gf +++ b/src/slovenian/PhraseSlv.gf @@ -6,8 +6,8 @@ concrete PhraseSlv of Phrase = CatSlv ** open Prelude, ResSlv, (P=ParamX) in { UttS s = s ; UttQS qs = qs ; UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc ! Sg} ; - UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc ! Sg} ; - UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc ! Sg} ; + UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc ! Pl} ; + UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc ! Pl} ; UttNP np = {s = np.s ! Nom} ; UttVP vp = {s = vp.s ! P.Pos ! VInf ++ vp.s2 ! {g=Masc; n=Sg; p=P3}} ; @@ -24,5 +24,6 @@ concrete PhraseSlv of Phrase = CatSlv ** open Prelude, ResSlv, (P=ParamX) in { NoPConj = {s = []} ; NoVoc = {s = []} ; + VocNP np = {s = "," ++ np.s ! Nom} ; } diff --git a/src/slovenian/QuestionSlv.gf b/src/slovenian/QuestionSlv.gf index 00ad3017..2336b8e7 100644 --- a/src/slovenian/QuestionSlv.gf +++ b/src/slovenian/QuestionSlv.gf @@ -9,6 +9,12 @@ lin QuestIComp icomp np = mkClause icomp.s np.a np.isPron {s = copula ; s2 = \\_ => [] ; isCop = True ; refl = []} ; CompIAdv a = a ; CompIP p = ss (p.s ! Nom) ; + AdvIAdv i a = ss (i.s ++ a.s) ; + AdvIP ip a = ip ** {s=\\c=>ip.s!c++a.s} ; + PrepIP prep ip = {s=prep.s++ip.s!prep.c} ; + IdetQuant q num = {s=q.s++num.s!Masc!Nom} ; + IdetCN det cn = {s=\\c=>det.s++cn.s!Indef!c!Pl;a={g=agender2gender cn.g;n=Pl;p=P3}} ; + IdetIP det = {s=\\_=>det.s;a={g=Neut;n=Pl;p=P3}} ; ------AR END diff --git a/src/slovenian/RelativeSlv.gf b/src/slovenian/RelativeSlv.gf new file mode 100644 index 00000000..4f91b9aa --- /dev/null +++ b/src/slovenian/RelativeSlv.gf @@ -0,0 +1,15 @@ +concrete RelativeSlv of Relative = CatSlv ** open ResSlv, Prelude in { +lin + IdRP = {s = \\_,_,_ => "ki"} ; + RelVP rp vp = { + s = \\a,t,ant,p => rp.s ! inanimateGender a.g ! Nom ! a.n ++ + predV False vp.isCop vp.refl vp.s ! t ! p ! a ++ vp.s2 ! a + } ; + RelSlash rp cl = { + s = \\a,t,ant,p => rp.s ! inanimateGender a.g ! cl.c2.c ! a.n ++ cl.s ! t ! ant ! p + } ; + RelCl cl = {s = \\_,t,a,p => "kar" ++ cl.s ! t ! a ! p} ; + FunRP prep np rp = { + s = \\g,c,n => prep.s ++ np.s ! prep.c ++ rp.s ! g ! c ! n + } ; +} diff --git a/src/slovenian/SentenceSlv.gf b/src/slovenian/SentenceSlv.gf index eaf2af67..8e01cf20 100644 --- a/src/slovenian/SentenceSlv.gf +++ b/src/slovenian/SentenceSlv.gf @@ -18,6 +18,13 @@ lin ExtAdvS a s = {s = a.s ++ bindComma ++ s.s} ; AdvS a s = {s = a.s ++ s.s} ; + SSubjS a subj b = {s = a.s ++ subj.s ++ b.s} ; + EmbedS s = s ; + EmbedQS s = s ; + PredSCVP sc vp = mkClause sc.s {g=Neut;n=Sg;p=P3} False vp ; + AdvImp adv imp = {s = \\p,g,n => adv.s ++ imp.s ! p ! g ! n} ; + UseRCl t p rcl = {s=\\a => t.s ++ p.s ++ rcl.s!a!t.t!t.a!p.p} ; + AdvSlash cls adv = cls ** {s=\\t,a,p=>cls.s!t!a!p++adv.s} ; + SlashPrep cl prep = cl ** {c2=prep} ; } - diff --git a/src/slovenian/VerbSlv.gf b/src/slovenian/VerbSlv.gf index 2866ddb2..dd295996 100644 --- a/src/slovenian/VerbSlv.gf +++ b/src/slovenian/VerbSlv.gf @@ -1,4 +1,4 @@ -concrete VerbSlv of Verb = CatSlv ** open ResSlv, ParamX, Prelude in { +concrete VerbSlv of Verb = CatSlv ** open ResSlv, ParamX, ParadigmsSlv, Prelude in { lin UseV v = @@ -8,6 +8,25 @@ concrete VerbSlv of Verb = CatSlv ** open ResSlv, ParamX, Prelude in { refl = v.refl } ; + ComplVV v vp = { + s = \\p,vf => ne ! p ++ v.s ! vf; + s2 = \\a => vp.s ! Pos ! VInf ++ vp.refl ++ vp.s2 ! a; + isCop=False; refl=[] + } ; + ComplVS v s = { + s = \\p,vf => ne ! p ++ v.s ! vf; + s2 = \\_ => v.p ++ "da" ++ s.s; isCop=False; refl=v.refl + } ; + ComplVQ v q = { + s = \\p,vf => ne ! p ++ v.s ! vf; + s2 = \\_ => q.s; isCop=False; refl=[] + } ; + ComplVA v ap = { + s = \\p,vf => ne ! p ++ v.s ! vf; + s2 = \\a => v.p ++ ap.s ! Indef ! inanimateGender a.g ! Nom ! a.n; + isCop=False; refl=v.refl + } ; + SlashV2a v = { s = \\p,vform => ne ! p ++ v.s ! vform ; s2 = \\a => v.p ; ----AR: +p particle @@ -16,6 +35,25 @@ concrete VerbSlv of Verb = CatSlv ** open ResSlv, ParamX, Prelude in { refl = v.refl } ; + SlashV2V v vp = { + s=\\p,vf => ne ! p ++ v.s ! vf; + s2=\\a => v.p ++ vp.s ! Pos ! VInf ++ vp.refl ++ vp.s2 ! a; + c2=mkPrep [] accusative; isCop=False; refl=v.refl + } ; + SlashV2S v s = { + s=\\p,vf => ne ! p ++ v.s ! vf; s2=\\_ => v.p ++ "da" ++ s.s; + c2=mkPrep [] accusative; isCop=False; refl=v.refl + } ; + SlashV2Q v q = { + s=\\p,vf => ne ! p ++ v.s ! vf; s2=\\_ => v.p ++ q.s; + c2=mkPrep [] accusative; isCop=False; refl=v.refl + } ; + SlashV2A v ap = { + s=\\p,vf => ne ! p ++ v.s ! vf; + s2=\\a => v.p ++ ap.s ! Indef ! inanimateGender a.g ! Acc ! a.n; + c2=mkPrep [] accusative; isCop=False; refl=v.refl + } ; + --Check these V3-slashes AE Slash2V3 v np = { s = \\p,vform => ne ! p ++ v.s ! vform ; @@ -53,6 +91,11 @@ concrete VerbSlv of Verb = CatSlv ** open ResSlv, ParamX, Prelude in { } ; AdvVP vp adv = insertObj (\\_ => adv.s) vp ; + ExtAdvVP vp adv = AdvVP vp adv ; + AdVVP adv vp = vp ** {s2 = \\a => adv.s ++ vp.s2 ! a} ; + AdvVPSlash vp adv = vp ** {s2 = \\a => vp.s2 ! a ++ adv.s} ; + AdVVPSlash adv vp = vp ** {s2 = \\a => adv.s ++ vp.s2 ! a} ; + VPSlashPrep vp prep = vp ** {c2=prep} ; CompAP ap = { s = \\agr => ap.s ! Indef ! inanimateGender agr.g ! Nom ! agr.n @@ -60,5 +103,7 @@ concrete VerbSlv of Verb = CatSlv ** open ResSlv, ParamX, Prelude in { CompAdv adv = {s = \\agr => adv.s} ; ----AR CompNP np = {s = \\agr => np.s ! Nom} ; ----AR + CompCN cn = {s = \\agr => cn.s ! Indef ! Nom ! agr.n} ; + UseCopula = {s=copula;s2=\\_=>[];isCop=True;refl=[]} ; }