cardinal numbers in Slovenian

This commit is contained in:
krasimir
2016-05-03 08:56:50 +00:00
parent 8a2d41d89f
commit 9bb33b7610
5 changed files with 38 additions and 17 deletions

View File

@@ -16,10 +16,14 @@ lincat
Pron = {s : Case => Str ; a : Agr} ;
Det = {s : Case => Str; spec : Species; n : Number} ;
Num = {s : Case => Str ; n : Number} ;
Det = {s : Gender => Case => Str; spec : Species; n : NumAgr} ;
Num = {s : Gender => Case => Str ; n : NumAgr} ;
Card = {s : Gender => Case => Str ; n : NumAgr} ;
Quant = {s : Str; spec : Species} ;
-- Numeral
Numeral = {s : Gender => Case => Str ; n : NumAgr} ;
-- Structural
Prep = {s : Str; c : Case} ;

View File

@@ -4,18 +4,17 @@ concrete GrammarSlv of Grammar =
NounSlv,
VerbSlv,
AdjectiveSlv,
{- AdverbEng,
NumeralEng,
-}
{- AdverbSlv,-}
NumeralSlv,
SentenceSlv,
{- QuestionEng,
RelativeEng,
ConjunctionEng,-}
{- QuestionSlv,
RelativeSlv,
ConjunctionSlv,-}
PhraseSlv,
TextX - [Pol,PPos,PNeg],
StructuralSlv
{- IdiomEng,
TenseX -}
StructuralSlv,
{- IdiomSlv, -}
TenseX
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;

View File

@@ -2,20 +2,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; p=P3}
s = \\c => det.s ! cn.g ! c ++
case det.n of {
UseNum n => cn.s ! det.spec ! c ! n ;
UseGen => cn.s ! det.spec ! Gen ! Pl
} ;
a = {g = cn.g ;
n = case det.n of {
UseNum n => n ;
UseGen => Pl
} ;
p = P3
}
} ;
UsePron p = p ;
DetQuant quant num = {
s = \\c => quant.s ++ num.s ! c;
s = \\c,g => quant.s ++ num.s ! c ! g;
spec = quant.spec ;
n = num.n ;
} ;
NumSg = {s = \\_ => []; n = Sg} ;
NumPl = {s = \\_ => []; n = Pl} ;
NumSg = {s = \\_,_ => []; n = UseNum Sg} ;
NumPl = {s = \\_,_ => []; n = UseNum Pl} ;
NumCard n = n ;
NumNumeral numeral = {s = numeral.s; n = numeral.n} ;
DefArt = {
s = "" ;

View File

@@ -7,6 +7,7 @@ concrete PhraseSlv of Phrase = CatSlv ** open Prelude, ResSlv in {
UttNP np = {s = np.s ! Nom} ;
UttAdv adv = adv ;
UttCN n = {s = n.s ! Indef ! Nom ! Sg} ;
UttCard n = {s = n.s ! Fem ! Nom} ;
UttAP ap = {s = ap.s ! Indef ! Masc ! Nom ! Sg} ;
UttInterj i = i ;

View File

@@ -6,7 +6,10 @@ param
Gender = Masc | Fem | Neut ;
Person = P1 | P2 | P3 ;
Species = Indef | Def ;
NumAgr = UseNum Number | UseGen;
DForm = Unit Gender | Teen | Ten | Hundred;
VForm = VInf
| VSup
| VPastPart Gender Number