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} ; Pron = {s : Role => Str; gen : AForm => Str; a : Agr} ;
Det = {s : DGender => Role => Str ; n : Number; countable : Bool; spec : Species} ; Det = {s : DGender => Role => Str ; n : Number; countable : Bool; spec : Species} ;
Predet = {s : GenNum => Str} ; Predet = {s : GenNum => Str} ;
Ord = {s : AForm => Str; nonEmpty : Bool} ; Ord = {s : AForm => Str} ;
Num = {s : DGenderSpecies => Str; n : Number; nonEmpty : Bool} ; Num = {s : DGenderSpecies => Str; n : Number; nonEmpty : Bool} ;
Card = {s : DGenderSpecies => Str; n : Number} ; Card = {s : DGenderSpecies => Str; n : Number} ;
Quant = {s : AForm => Str; spec : Species} ; Quant = {s : AForm => Str} ;
Art = {s : AForm => Str; spec : Species} ; Art = {s : Str; spec : Species} ;
-- Numeral -- Numeral

View File

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

View File

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