forked from GitHub/gf-core
Don't use CommonX because the bulgarian CAdv category differ from the common one. The new CAdv definition is added
This commit is contained in:
@@ -15,5 +15,5 @@ concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
|
||||
SubjS = cc2 ;
|
||||
AdvSC s = s ; --- this rule give stack overflow in ordinary parsing
|
||||
|
||||
AdnCAdv cadv = {s = cadv.s ++ "îò"} ;
|
||||
AdnCAdv cadv = {s = cadv.sn ++ "îò"} ;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,29 @@
|
||||
concrete CatBul of Cat = CommonX ** open ResBul, Prelude in {
|
||||
concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
|
||||
lincat
|
||||
|
||||
-- Text, Phrase, Utterance
|
||||
|
||||
Text = {s : Str} ;
|
||||
Phr = {s : Str} ;
|
||||
Utt = {s : Str} ;
|
||||
Voc = {s : Str} ;
|
||||
PConj = {s : Str} ;
|
||||
|
||||
-- Tense, Anteriority, Polarity
|
||||
|
||||
Tense = {s : Str ; t : R.Tense} ;
|
||||
Ant = {s : Str ; a : R.Anteriority} ;
|
||||
Pol = {s : Str ; p : R.Polarity} ;
|
||||
|
||||
-- Tensed/Untensed
|
||||
|
||||
S = {s : Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
SC = {s : Str} ;
|
||||
|
||||
-- Sentence
|
||||
|
||||
@@ -30,11 +46,19 @@ concrete CatBul of Cat = CommonX ** open ResBul, Prelude in {
|
||||
} ;
|
||||
|
||||
Comp = {s : Agr => Str} ;
|
||||
AdV = {s : Str} ; --lock_AdV : {}} ;
|
||||
|
||||
-- Adjective
|
||||
|
||||
AP = {s : AForm => Str; isPre : Bool} ;
|
||||
|
||||
-- Adjective
|
||||
|
||||
Adv = {s : Str} ;
|
||||
CAdv = {s : Str; sn : Str} ;
|
||||
IAdv = {s : Str} ;
|
||||
AdA = {s : Str} ;
|
||||
|
||||
-- Noun
|
||||
|
||||
CN = {s : NForm => Str; g : DGender} ;
|
||||
@@ -50,6 +74,7 @@ concrete CatBul of Cat = CommonX ** open ResBul, Prelude in {
|
||||
|
||||
Numeral = {s : CardOrd => Str; n : Number} ;
|
||||
Digits = {s : CardOrd => Str; n : Number; tail : DTail} ;
|
||||
AdN = {s : Str} ;
|
||||
|
||||
-- Structural
|
||||
|
||||
@@ -69,4 +94,17 @@ concrete CatBul of Cat = CommonX ** open ResBul, Prelude in {
|
||||
N2 = {s : NForm => Str; g : DGender} ** {c2 : Str} ;
|
||||
N3 = {s : NForm => Str; g : DGender} ** {c2,c3 : Str} ;
|
||||
PN = {s : Str; g : Gender} ;
|
||||
|
||||
|
||||
-- Tense, Anteriority and Polarity functions
|
||||
|
||||
lin
|
||||
PPos = {s = []} ** {p = R.Pos} ;
|
||||
PNeg = {s = []} ** {p = R.Neg} ;
|
||||
TPres = {s = []} ** {t = R.Pres} ;
|
||||
TPast = {s = []} ** {t = R.Past} ; --# notpresent
|
||||
TFut = {s = []} ** {t = R.Fut} ; --# notpresent
|
||||
TCond = {s = []} ** {t = R.Cond} ; --# notpresent
|
||||
ASimul = {s = []} ** {a = R.Simul} ;
|
||||
AAnter = {s = []} ** {a = R.Anter} ; --# notpresent
|
||||
}
|
||||
@@ -9,7 +9,7 @@ concrete GrammarBul of Grammar =
|
||||
SentenceBul,
|
||||
QuestionBul,
|
||||
PhraseBul,
|
||||
TextX,
|
||||
TextBul,
|
||||
StructuralBul
|
||||
** {
|
||||
|
||||
|
||||
@@ -63,9 +63,9 @@ concrete StructuralBul of Structural = CatBul **
|
||||
"âúâ" / strs {"â" ; "ô" ; "Â" ; "Ô"}
|
||||
}) ;
|
||||
it_Pron = mkNP "òî" "íåãî" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Neut) P3 ;
|
||||
less_CAdv = ss "íå" ;
|
||||
less_CAdv = {s="íå"; sn="ïî-ìàëêî"} ;
|
||||
many_Det = mkDeterminerPl "ìíîãî" ;
|
||||
more_CAdv = ss [] ;
|
||||
more_CAdv = {s=[]; sn="ïîâå÷å"} ;
|
||||
most_Predet = {s = \\_ => "ïîâå÷åòî"} ;
|
||||
much_Det = mkDeterminerSg "ìíîãî" "ìíîãî" "ìíîãî";
|
||||
{-
|
||||
|
||||
11
lib/resource/bulgarian/TextBul.gf
Normal file
11
lib/resource/bulgarian/TextBul.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
concrete TextBul of Text = CatBul ** {
|
||||
|
||||
-- This will work for almost all languages except Spanish.
|
||||
|
||||
lin
|
||||
TEmpty = {s = []} ;
|
||||
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ;
|
||||
TQuestMark x xs = {s = x.s ++ "?" ++ xs.s} ;
|
||||
TExclMark x xs = {s = x.s ++ "!" ++ xs.s} ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user