simple NP phrases in Slovenian

This commit is contained in:
krasimir
2016-03-25 06:23:54 +00:00
parent 39c7865e67
commit 7a45959d9e
3 changed files with 32 additions and 1 deletions

View File

@@ -6,6 +6,11 @@ lincat
-- Noun
CN = {s : Species => Case => Number => Str; g : Gender} ;
NP = {s : Case => Str ; a : Agr} ;
Det = {s : Case => Str; spec : Species; n : Number} ;
Num = {s : Case => Str ; n : Number} ;
Quant = {s : Str; spec : Species} ;
-- Structural
Prep = {s : Str; c : Case} ;

View File

@@ -1,11 +1,34 @@
concrete NounSlv of Noun = CatSlv ** open ResSlv in {
lin
DetCN det cn = {
s = \\c => det.s ! c ++ cn.s ! det.spec ! c ! det.n ;
a = {g=cn.g; n=det.n}
} ;
DetQuant quant num = {
s = \\c => quant.s ++ num.s ! c;
spec = quant.spec ;
n = num.n ;
} ;
NumSg = {s = \\_ => []; n = Sg} ;
NumPl = {s = \\_ => []; n = Pl} ;
DefArt = {
s = "" ;
spec = Def
} ;
IndefArt = {
s = "" ;
spec = Indef
} ;
UseN n = {s = \\_ => n.s; g = n.g} ;
AdjCN ap cn = {
s = \\spec,c,n => ap.s ! spec ! cn.g ! c ! n ++ cn.s ! Indef ! c ! n ;
g = cn.g
} ;
}

View File

@@ -24,4 +24,7 @@ param
| AComparDefAcc
| ASuperlDefAcc ;
oper
Agr = {g : Gender; n : Number} ;
}