1
0
forked from GitHub/gf-core

imperatives in Slovenian

This commit is contained in:
krasimir
2016-05-06 08:29:25 +00:00
parent ca3f218122
commit ead812e2b0
5 changed files with 26 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ concrete CatSlv of Cat = CommonX ** open ResSlv, (P=ParamX) in {
lincat
-- Sentence
Cl = {s : P.Tense => P.Anteriority => P.Polarity => Str} ;
Imp = {s : P.Polarity => Gender => Number => Str} ;
-- Verb
VP = ResSlv.VP ;

View File

@@ -4,6 +4,10 @@ concrete PhraseSlv of Phrase = CatSlv ** open Prelude, ResSlv in {
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
UttS s = s ;
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} ;
UttNP np = {s = np.s ! Nom} ;
UttAdv adv = adv ;
UttCN n = {s = n.s ! Indef ! Nom ! Sg} ;

View File

@@ -30,16 +30,14 @@ param
oper
Agr = {g : Gender; n : Number; p : Person} ;
VP = {s : Tense => Agr => Str; s2 : Agr => Str} ;
VP = {s : VForm => Str; s2 : Agr => Str} ;
predV : (VForm => Str) -> VP =
\v -> { s = table {
Pres => \\a => v ! VPres a.n a.p ;
Past => \\a => sem_V ! a.n ! a.p ++ v ! VPastPart a.g a.n ;
Fut => \\a => bom_V ! a.n ! a.p ++ v ! VPastPart a.g a.n ;
Cond => \\a => "bi" ++ v ! VPastPart a.g a.n
} ;
s2= \\a => ""
predV : (VForm => Str) -> Tense => Agr => Str =
\v -> table {
Pres => \\a => v ! VPres a.n a.p ;
Past => \\a => sem_V ! a.n ! a.p ++ v ! VPastPart a.g a.n ;
Fut => \\a => bom_V ! a.n ! a.p ++ v ! VPastPart a.g a.n ;
Cond => \\a => "bi" ++ v ! VPastPart a.g a.n
} ;
sem_V : Number => Person => Str =
@@ -87,7 +85,7 @@ oper
mkClause : Str -> Agr -> VP -> Clause =
\subj,agr,vp -> {
s = \\t,a,p =>
subj ++ vp.s ! t ! agr ++ vp.s2 ! agr
subj ++ predV vp.s ! t ! agr ++ vp.s2 ! agr
} ;
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> vp ** {

View File

@@ -3,6 +3,10 @@ concrete SentenceSlv of Sentence = CatSlv ** open Prelude, ResSlv in {
lin
PredVP np vp = mkClause (np.s ! Nom) np.a vp ;
ImpVP vp = {
s = \\pol,g,n => vp.s ! VImper2 n ++ vp.s2 ! {g=g; n=n; p=P2} ;
} ;
UseCl t p cl = {
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
} ;

View File

@@ -1,9 +1,16 @@
concrete VerbSlv of Verb = CatSlv ** open ResSlv, Prelude in {
lin
UseV v = predV v.s ;
UseV v =
{ s = v.s ;
s2 = \\a => ""
} ;
SlashV2a v = predV v.s ** {c2 = v.c2} ;
SlashV2a v =
{ s = v.s ;
s2 = \\a => "" ;
c2 = v.c2
} ;
ComplSlash vp np =
insertObj (\\_ => vp.c2.s ++ np.s ! vp.c2.c) vp ;