1
0
forked from GitHub/gf-core

simplify the determiners in bulgarian-1.4

This commit is contained in:
krasimir
2008-06-09 07:11:32 +00:00
parent 5cf3daf609
commit 3c2f45da85
3 changed files with 42 additions and 36 deletions

View File

@@ -82,11 +82,11 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
Pron = {s : Role => Str; gen : AForm => Str; a : Agr} ;
Det = {s : DGender => Role => Str ; n : Number; countable : Bool; spec : Species} ;
Predet = {s : GenNum => Str} ;
Ord = {s : AForm => Str; nonEmpty : Bool} ;
Ord = {s : AForm => Str} ;
Num = {s : DGenderSpecies => Str; n : Number; nonEmpty : Bool} ;
Card = {s : DGenderSpecies => Str; n : Number} ;
Quant = {s : AForm => Str; spec : Species} ;
Art = {s : AForm => Str; spec : Species} ;
Quant = {s : AForm => Str} ;
Art = {s : Str; spec : Species} ;
-- Numeral

View File

@@ -24,15 +24,14 @@ oper
mkDeterminerPl : Str -> {s : DGender => Role => Str ; n : Number; countable : Bool ; spec : Species} = \vsicki ->
{s = \\_,_ => vsicki; n = Pl; countable = False; spec = Indef} ;
mkQuant : Str -> Str -> Str -> Str -> {s : AForm => Str; spec : Species} = \tozi,tazi,towa,tezi -> {
mkQuant : Str -> Str -> Str -> Str -> {s : AForm => Str} = \tozi,tazi,towa,tezi -> {
s = \\aform => case aform of {
ASg Masc _ => tozi ;
ASgMascDefNom => tozi ;
ASg Fem _ => tazi ;
ASg Neut _ => towa ;
APl _ => tezi
};
spec = Indef
}
} ;

View File

@@ -65,45 +65,52 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
a = np.a
} ;
DetQuantOrd, DetArtOrd = \quant, num, ord -> {
s = \\g,c => num.s ! dgenderSpecies g quant.spec c ++
quant.s ! aform (gennum g num.n) Def c ++
ord.s ! aform (gennum g num.n) (case num.nonEmpty of {False => quant.spec; _ => Indef}) c ;
n = num.n ;
countable = num.nonEmpty ;
spec=case <num.nonEmpty,ord.nonEmpty> of {<False,False> => quant.spec; _ => Indef}
} ;
DetQuant quant num = {
s = \\g,c => num.s ! dgenderSpecies g quant.spec c ++
quant.s ! aform (gennum g num.n) Def c ;
s = \\g,c => quant.s ! aform (gennum g num.n) Def c ++
num.s ! dgenderSpecies g Indef c ;
n = num.n ;
countable = num.nonEmpty ;
spec=case num.nonEmpty of {False => quant.spec; _ => Indef} ---- FIXME AR
spec=Indef
} ;
DetArtCard quant num = {
s = \\g,c => num.s ! dgenderSpecies g quant.spec c ++
quant.s ! aform (gennum g num.n) Def c ;
DetQuantOrd = \quant, num, ord -> {
s = \\g,c => quant.s ! aform (gennum g num.n) Def c ++
num.s ! dgenderSpecies g Indef c ++
ord.s ! aform (gennum g num.n) Indef c ;
n = num.n ;
countable = True ;
spec= Indef ---- FIXME AR
countable = num.nonEmpty ;
spec=Indef
} ;
---- FIXME AR
DetArtPl quant = detCN {
s = \\g,c => quant.s ! aform (gennum g Pl) Def c ;
DetArtCard art card = {
s = \\g,c => art.s ++
card.s ! dgenderSpecies g art.spec c ;
n = card.n ;
countable = True ;
spec=Indef
} ;
DetArtOrd = \art, num, ord -> {
s = \\g,c => art.s ++
num.s ! dgenderSpecies g art.spec c ++
ord.s ! aform (gennum g num.n) (case num.nonEmpty of {False => art.spec; _ => Indef}) c ;
n = num.n ;
countable = num.nonEmpty ;
spec=Indef
} ;
DetArtPl art = detCN {
s = \\g,c => art.s ;
n = Pl ;
countable = False ;
spec=quant.spec;
spec=art.spec;
} ;
---- FIXME AR
DetArtSg quant = detCN {
s = \\g,c => quant.s ! aform (gennum g Sg) Def c ;
DetArtSg art = detCN {
s = \\g,c => art.s ;
n = Sg ;
countable = False ;
spec=quant.spec;
spec=art.spec;
} ;
PossPron p = {
@@ -117,22 +124,22 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
NumCard n = n ** {nonEmpty = True} ;
NumDigits n = {s = \\gspec => n.s ! NCard gspec; n = n.n} ;
OrdDigits n = {s = \\aform => n.s ! NOrd aform; nonEmpty = True} ;
OrdDigits n = {s = \\aform => n.s ! NOrd aform} ;
NumNumeral numeral = {s = \\gspec => numeral.s ! NCard gspec; n = numeral.n; nonEmpty = True} ;
OrdNumeral numeral = {s = \\aform => numeral.s ! NOrd aform; nonEmpty = True} ;
OrdNumeral numeral = {s = \\aform => numeral.s ! NOrd aform} ;
AdNum adn num = {s = \\gspec => adn.s ++ num.s ! gspec; n = num.n; nonEmpty = num.nonEmpty} ;
OrdSuperl a = {s = \\aform => "íàé" ++ "-" ++ a.s ! aform; nonEmpty = True} ;
OrdSuperl a = {s = \\aform => "íàé" ++ "-" ++ a.s ! aform} ;
DefArt = {
s = \\_ => [] ;
s = [] ;
spec = ResBul.Def
} ;
IndefArt = {
s = \\_ => [] ;
s = [] ;
spec = ResBul.Indef
} ;