mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 18:02:54 -06:00
added conjugations
This commit is contained in:
@@ -89,6 +89,8 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
|
|||||||
|
|
||||||
-- Structural
|
-- Structural
|
||||||
|
|
||||||
|
Conj = {s : Str ; n : Number} ;
|
||||||
|
DConj = {s1,s2 : Str ; n : Number} ;
|
||||||
Subj = {s : Str} ;
|
Subj = {s : Str} ;
|
||||||
Prep = {s : Str; c : Case} ;
|
Prep = {s : Str; c : Case} ;
|
||||||
|
|
||||||
|
|||||||
47
lib/resource/bulgarian/ConjunctionBul.gf
Normal file
47
lib/resource/bulgarian/ConjunctionBul.gf
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
concrete ConjunctionBul of Conjunction =
|
||||||
|
CatBul ** open ResBul, Coordination, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
ConjS = conjunctSS ;
|
||||||
|
DConjS = conjunctDistrSS ;
|
||||||
|
|
||||||
|
ConjAdv = conjunctSS ;
|
||||||
|
DConjAdv = conjunctDistrSS ;
|
||||||
|
|
||||||
|
ConjNP conj ss = conjunctTable Role conj ss ** {
|
||||||
|
a = {gn = conjGenNum (gennum DMasc conj.n) ss.a.gn; p = ss.a.p}
|
||||||
|
} ;
|
||||||
|
DConjNP conj ss = conjunctDistrTable Role conj ss ** {
|
||||||
|
a = {gn = conjGenNum (gennum DMasc conj.n) ss.a.gn; p = ss.a.p}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjAP conj ss = conjunctTable AForm conj ss ** {
|
||||||
|
isPre = ss.isPre
|
||||||
|
} ;
|
||||||
|
DConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
||||||
|
isPre = ss.isPre
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
|
BaseS = twoSS ;
|
||||||
|
ConsS = consrSS comma ;
|
||||||
|
|
||||||
|
BaseAdv = twoSS ;
|
||||||
|
ConsAdv = consrSS comma ;
|
||||||
|
|
||||||
|
BaseNP x y = twoTable Role x y ** {a = conjAgr x.a y.a} ;
|
||||||
|
ConsNP xs x = consrTable Role comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||||
|
|
||||||
|
BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ;
|
||||||
|
ConsAP xs x = consrTable AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[S] = {s1,s2 : Str} ;
|
||||||
|
[Adv] = {s1,s2 : Str} ;
|
||||||
|
[NP] = {s1,s2 : Role => Str ; a : Agr} ;
|
||||||
|
[AP] = {s1,s2 : AForm => Str ; isPre : Bool} ;
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ concrete GrammarBul of Grammar =
|
|||||||
SentenceBul,
|
SentenceBul,
|
||||||
QuestionBul,
|
QuestionBul,
|
||||||
RelativeBul,
|
RelativeBul,
|
||||||
|
ConjunctionBul,
|
||||||
PhraseBul,
|
PhraseBul,
|
||||||
TextBul,
|
TextBul,
|
||||||
StructuralBul
|
StructuralBul
|
||||||
|
|||||||
@@ -102,6 +102,17 @@ resource ResBul = ParamX ** open Prelude in {
|
|||||||
--2 Transformations between parameter types
|
--2 Transformations between parameter types
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
conjGenNum : GenNum -> GenNum -> GenNum = \a,b ->
|
||||||
|
case <a,b> of {
|
||||||
|
<GSg _,GSg g> => GSg g ;
|
||||||
|
_ => GPl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjAgr : Agr -> Agr -> Agr = \a,b -> {
|
||||||
|
gn = conjGenNum a.gn b.gn ;
|
||||||
|
p = conjPerson a.p b.p
|
||||||
|
} ;
|
||||||
|
|
||||||
gennum : DGender -> Number -> GenNum = \g,n ->
|
gennum : DGender -> Number -> GenNum = \g,n ->
|
||||||
case n of {
|
case n of {
|
||||||
Sg => GSg (case g of {
|
Sg => GSg (case g of {
|
||||||
|
|||||||
@@ -10,15 +10,13 @@ concrete StructuralBul of Structural = CatBul **
|
|||||||
almost_AdA, almost_AdN = ss "ïî÷òè" ;
|
almost_AdA, almost_AdN = ss "ïî÷òè" ;
|
||||||
although_Subj = ss ["âúïðåêè ÷å"] ;
|
although_Subj = ss ["âúïðåêè ÷å"] ;
|
||||||
{- always_AdV = ss "always" ;
|
{- always_AdV = ss "always" ;
|
||||||
and_Conj = ss "and" ** {n = Pl} ;
|
|
||||||
-}
|
-}
|
||||||
|
and_Conj = ss "è" ** {n = Pl} ;
|
||||||
because_Subj = ss "çàùîòî" ;
|
because_Subj = ss "çàùîòî" ;
|
||||||
before_Prep = mkPrep "ïðåäè" Acc ;
|
before_Prep = mkPrep "ïðåäè" Acc ;
|
||||||
behind_Prep = mkPrep "çàä" Acc ;
|
behind_Prep = mkPrep "çàä" Acc ;
|
||||||
between_Prep = mkPrep "ìåæäó" Acc ;
|
between_Prep = mkPrep "ìåæäó" Acc ;
|
||||||
{-
|
both7and_DConj = sd2 "è" "è" ** {n = Pl} ;
|
||||||
both7and_DConj = sd2 "both" "and" ** {n = Pl} ;
|
|
||||||
-}
|
|
||||||
but_PConj = ss "íî" ;
|
but_PConj = ss "íî" ;
|
||||||
by8agent_Prep = mkPrep "÷ðåç" Acc ;
|
by8agent_Prep = mkPrep "÷ðåç" Acc ;
|
||||||
by8means_Prep = mkPrep "÷ðåç" Acc ;
|
by8means_Prep = mkPrep "÷ðåç" Acc ;
|
||||||
@@ -37,9 +35,7 @@ concrete StructuralBul of Structural = CatBul **
|
|||||||
} ;
|
} ;
|
||||||
-}
|
-}
|
||||||
during_Prep = mkPrep ["ïî âðåìå íà"] Acc ;
|
during_Prep = mkPrep ["ïî âðåìå íà"] Acc ;
|
||||||
{-
|
either7or_DConj = sd2 "èëè" "èëè" ** {n = Sg} ;
|
||||||
either7or_DConj = sd2 "either" "or" ** {n = Sg} ;
|
|
||||||
-}
|
|
||||||
everybody_NP = mkNP "âñåêè" (GSg Masc) P3 ;
|
everybody_NP = mkNP "âñåêè" (GSg Masc) P3 ;
|
||||||
every_Det = mkDeterminerSg "âñåêè" "âñÿêà" "âñÿêî";
|
every_Det = mkDeterminerSg "âñåêè" "âñÿêà" "âñÿêî";
|
||||||
everything_NP = mkNP "âñÿêî" (GSg Neut) P3 ;
|
everything_NP = mkNP "âñÿêî" (GSg Neut) P3 ;
|
||||||
@@ -84,9 +80,7 @@ concrete StructuralBul of Structural = CatBul **
|
|||||||
on_Prep = mkPrep "íà" Acc ;
|
on_Prep = mkPrep "íà" Acc ;
|
||||||
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
|
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
|
||||||
only_Predet = {s = \\_ => "ñàìî"} ;
|
only_Predet = {s = \\_ => "ñàìî"} ;
|
||||||
{-
|
or_Conj = ss "èëè" ** {n = Sg} ;
|
||||||
or_Conj = ss "or" ** {n = Sg} ;
|
|
||||||
-}
|
|
||||||
otherwise_PConj = ss "èíà÷å" ;
|
otherwise_PConj = ss "èíà÷å" ;
|
||||||
part_Prep = mkPrep "îò" Acc ;
|
part_Prep = mkPrep "îò" Acc ;
|
||||||
please_Voc = ss "ìîëÿ" ;
|
please_Voc = ss "ìîëÿ" ;
|
||||||
|
|||||||
Reference in New Issue
Block a user