conjunction in Slovenian

This commit is contained in:
krasimir
2016-08-16 10:35:30 +00:00
parent a70ca7a35e
commit b13866e3ef
5 changed files with 32 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ lincat
Numeral = {s : Gender => Case => Str ; n : NumAgr} ;
-- Structural
Conj = {s : Str} ;
Conj = {s : Str; n : Number} ;
Prep = {s : Str; c : Case} ;
-- Open lexical classes, e.g. Lexicon

View File

@@ -2,19 +2,34 @@ concrete ConjunctionSlv of Conjunction =
CatSlv ** open ResSlv in {
lin
ConjNP conj xs = {
s = \\c => xs.s1 ! c ++ conj.s ++ xs.s2 ! c ;
a = {g = xs.a.g; n = conjNumber conj.n xs.a.n; p = xs.a.p}
} ;
ConjAP conj xs = {
s = \\sp,g,c,n => xs.s1 ! sp ! g ! c ! n ++ conj.s ++ xs.s2 ! sp ! g ! c ! n
} ;
-- These fun's are generated from the list cat's.
BaseAP x y = { s1 = x.s; s2=y.s } ;
BaseNP x y = {
s1 = x.s ;
s2 = y.s ;
a = conjAgr x.a y.a
} ;
ConsNP x xs = {
s1 = \\c => x.s ! c ++ "," ++ xs.s1 ! c ;
s2 = xs.s2 ;
a = conjAgr x.a xs.a
} ;
BaseAP x y = { s1 = x.s; s2 = y.s } ;
ConsAP x xs = {
s1 = \\sp,g,c,n => x.s ! sp ! g ! c ! n ++ xs.s1 ! sp ! g ! c ! n ;
s2 = xs.s2
} ;
lincat
[NP] = {s1,s2 : Case => Str; a : Agr} ;
[AP] = {s1,s2 : Species => Gender => Case => Number => Str} ;
}

View File

@@ -387,6 +387,6 @@ oper
mkInterj : Str -> Interj =
\s -> lin Interj {s=s} ;
mkConj : Str -> Conj =
\s -> lin Conj {s=s} ;
mkConj : Str -> Number -> Conj =
\s,n -> lin Conj {s=s; n=n} ;
}

View File

@@ -30,6 +30,18 @@ param
oper
Agr = {g : Gender; n : Number; p : Person} ;
conjNumber : Number -> Number -> Number = \m,n ->
case m of {
Sg => n ;
_ => Pl
} ;
conjAgr : Agr -> Agr -> Agr = \a,b -> {
g = b.g ;
n = conjNumber a.n b.n ;
p = b.p
} ;
VP = {s : VForm => Str; s2 : Agr => Str} ;
neg : Polarity => Tense => Str =

View File

@@ -1,7 +1,7 @@
concrete StructuralSlv of Structural = CatSlv ** open ResSlv, ParadigmsSlv in {
lin
and_Conj = mkConj "in" ;
and_Conj = mkConj "in" Pl ;
he_Pron = mkPron "òn" "njêga" "njêga" "njêmu" "njêm" "njím"
"njegôv" "njegôvega" "njegôvemu" ("njegôv"|"njegôvega") "njegôvem" "njegôvim"
"njegôva" "njegôvih" "njegôvima" "njegôva" "njegôvih" "njegôvima"