Merge branch 'master' into master

This commit is contained in:
Inari Listenmaa
2020-10-27 10:32:25 +01:00
committed by GitHub
915 changed files with 1138903 additions and 679509 deletions

View File

@@ -8,17 +8,18 @@ FocusObjS nsubj head -- again might be wrong; more correct to call
QuestIAdv advmod head -- "where does John sleep" cf. AdvVP
QuestIComp head nsubj -- "where is John": John is clearly nsubj, but is where the head?
QuestQVP nsubj head
QuestSlash dobj head
QuestSlash obj head
QuestVP nsubj head
IdetCN det head
PredSCVP csubj head
ComplSlash head dobj
ComplSlashIP head dobj
Slash3V3 head dobj
SlashV2VNP head dobj xcomp
PastPartAgentAP head dobj
AdvQVP head dobj
ComplSlash head obj
ComplSlashIP head obj
Slash3V3 head obj
SlashV2VNP head obj xcomp
PastPartAgentAP head obj
AdvQVP head obj
Slash2V3 head iobj
@@ -66,8 +67,8 @@ RelSlash mark head
ComplN2 head nmod
ComplN3 nmod head
AdvCN head nmod
PossNP nmod head
PartNP nmod head
PossNP head nmod
PartNP head nmod
ExistNPAdv head nmod
OrdNumeralSuperl nummod head -- quite wrong; cannot find relevant details in the documentation; but most probably head lies outside the score of this function
@@ -80,12 +81,12 @@ ApposNP head appos
RelNP head acl
RelCN head acl
SentCN head acl
SentAP amod acl
SentAP head acl
DetQuantOrd head nummod amod -- quite wrong; again for same reason as DetQuant function
DetCN det head
IDetCN det head
IDetQuant head empty
IdetCN det head
IdetQuant head nummod
CountNP det head
PredetNP det head
PPartNP head amod -- only in core RGL
@@ -156,12 +157,12 @@ TExclMark head dep -- punctuation in the middle in these three
TFullStop head dep
TQuestMark head dep
ComplV2 head dobj -- shortcuts in App
ComplV2V head dobj xcomp
ComplV3 head iobj dobj ---- could be dobj dobj
ComplV2 head obj -- shortcuts in App
ComplV2V head obj xcomp
ComplV3 head iobj obj ---- could be dobj dobj
PassAgentV2 head ncomp -- not sure
RelV2 mark nsubj head
QuestV2 dobj nsubj head
QuestV2 obj nsubj head
ModCN amod head -- in ResourceDemo
RSubjS mark advcl head

View File

@@ -39,6 +39,7 @@ fun
n_units_AP : Card -> CN -> A -> AP ; -- x inches long
n_units_of_NP : Card -> CN -> NP -> NP ; -- x ounces of this flour
n_unit_CN : Card -> CN -> CN -> CN ; -- x gallon bottle
-- containers
@@ -78,7 +79,8 @@ cat
Year ;
fun
timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours
timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours
timeunitRange : Card -> Card -> Timeunit -> Adv ; -- (cats live) ten to twenty years
oneHour : Hour ;
twoHour : Hour ;
@@ -105,8 +107,8 @@ fun
twentyThreeHour : Hour ;
twentyFourHour : Hour ;
timeHour : Hour -> Adv ; -- at three (o'clock / am / pm)
timeHourMinute : Hour -> Card -> Adv ; -- at forty past six
timeHour : Hour -> Adv ; -- at three a.m./p.m.
timeHourMinute : Hour -> Card -> Adv ; -- at six forty a.m./p.m.
weekdayPunctualAdv : Weekday -> Adv ; -- on Monday
weekdayHabitualAdv : Weekday -> Adv ; -- on Mondays

View File

@@ -30,7 +30,7 @@ abstract Extend = Cat ** {
StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with
StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in
EmptyRelSlash : ClSlash -> RCl ; -- he lives in
-- $VP$ conjunction, separate categories for finite and infinitive forms (VPS and VPI, respectively)
-- covering both in the same category leads to spurious VPI parses because VPS depends on many more tenses
@@ -45,7 +45,14 @@ abstract Extend = Cat ** {
MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
SQuestVPS : NP -> VPS -> QS ; -- has she walked
QuestVPS : IP -> VPS -> QS ; -- who has walked
-- existentials that work in the absence of Cl
ExistS : Temp -> Pol -> NP -> S ; -- there was a party
ExistNPQS : Temp -> Pol -> NP -> QS ; -- was there a party
ExistIPQS : Temp -> Pol -> IP -> QS ; -- what was there
MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
ComplVPIVV : VV -> VPI -> VP ; -- must sleep and walk
@@ -59,17 +66,17 @@ abstract Extend = Cat ** {
[VPI2] {2} ; -- to love, to hate
fun
MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person
MkVPI2 : VPSlash -> VPI2 ; -- to love
MkVPI2 : VPSlash -> VPI2 ; -- to love
ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate
ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person
fun
ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired"
ICompAP : AP -> IComp ; -- "how old"
IAdvAdv : Adv -> IAdv ; -- "how often"
@@ -88,15 +95,15 @@ abstract Extend = Cat ** {
-- participle constructions
PresPartAP : VP -> AP ; -- (the man) looking at Mary
EmbedPresPart : VP -> SC ; -- looking at Mary (is fun)
PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company
-- this is a generalization of Verb.PassV2 and should replace it in the future.
PassVPSlash : VPSlash -> VP ; -- be forced to sleep
-- the form with an agent may result in a different linearization
-- the form with an agent may result in a different linearization
-- from an adverbial modification by an agent phrase.
PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go
@@ -105,6 +112,10 @@ abstract Extend = Cat ** {
NominalizeVPSlashNP : VPSlash -> NP -> NP ;
-- counterpart to ProgrVP, for VPSlash
ProgrVPSlash : VPSlash -> VPSlash;
-- existential for mathematics
ExistsNP : NP -> Cl ; -- there exists a number / there exist numbers
@@ -115,6 +126,10 @@ abstract Extend = Cat ** {
ExistMassCN : CN -> Cl ; -- there is beer / there is no beer
ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees
-- generalisation of existential, with adverb as a parameter
AdvIsNP : Adv -> NP -> Cl ; -- here is the tree / here are the trees
AdvIsNPAP : Adv -> NP -> AP -> Cl ; -- here are the instructions documented
-- infinitive for purpose AR 21/8/2013
PurposeVP : VP -> Adv ; -- to become happy
@@ -134,13 +149,23 @@ abstract Extend = Cat ** {
-- proper structure of "it is AP to VP"
PredAPVP : AP -> VP -> Cl ; -- it is good to walk
PredAPVP : AP -> VP -> Cl ; -- it is good to walk
-- to use an AP as CN or NP without CN
AdjAsCN : AP -> CN ; -- a green one ; en grön (Swe)
AdjAsNP : AP -> NP ; -- green (is good)
-- infinitive complement for IAdv
PredIAdvVP : IAdv -> VP -> QCl ; -- how to walk?
-- alternative to EmbedQS. For English, EmbedQS happens to work,
-- because "what" introduces question and relative. The default linearization
-- could be e.g. "the thing we did (was fun)".
EmbedSSlash : SSlash -> SC ; -- what we did (was fun)
-- reflexive noun phrases: a generalization of Verb.ReflVP, which covers just reflexive pronouns
-- This is necessary in languages like Swedish, which have special reflexive possessives.
-- However, it is also needed in application grammars that want to treat "brush one's teeth" as a one-place predicate.
@@ -148,8 +173,8 @@ abstract Extend = Cat ** {
cat
RNP ; -- reflexive noun phrase, e.g. "my family and myself"
RNPList ; -- list of reflexives to be coordinated, e.g. "my family, myself, everyone"
-- Notice that it is enough for one NP in RNPList to be RNP.
-- Notice that it is enough for one NP in RNPList to be RNP.
fun
ReflRNP : VPSlash -> RNP -> VP ; -- love my family and myself
@@ -161,7 +186,7 @@ abstract Extend = Cat ** {
ConjRNP : Conj -> RNPList -> RNP ; -- my family, John and myself
Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself
Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself
Base_nr_RNP : NP -> RNP -> RNPList ; -- John, myself
Base_rn_RNP : RNP -> NP -> RNPList ; -- myself, John
Cons_rr_RNP : RNP -> RNPList -> RNPList ; -- my family, myself, John
@@ -181,8 +206,8 @@ abstract Extend = Cat ** {
GerundNP : VP -> NP ; -- publishing the document (by nature definite)
GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
WithoutVP : VP -> Adv ; -- without publishing the document
ByVP : VP -> Adv ; -- by publishing the document
WithoutVP : VP -> Adv ; -- without publishing the document
ByVP : VP -> Adv ; -- by publishing the document
InOrderToVP : VP -> Adv ; -- (in order) to publish the document
ApposNP : NP -> NP -> NP ; -- Mr Macron, the president of France,
@@ -206,6 +231,10 @@ abstract Extend = Cat ** {
DetNPMasc : Det -> NP ;
DetNPFem : Det -> NP ;
UseComp_estar : Comp -> VP ; -- (Cat, Spa, Por) "está cheio" instead of "é cheio"
SubjRelNP : NP -> RS -> NP ; -- Force RS in subjunctive: lo que les *resulte* mejor
iFem_Pron : Pron ; -- I (Fem)
youFem_Pron : Pron ; -- you (Fem)
weFem_Pron : Pron ; -- we (Fem)

View File

@@ -17,6 +17,10 @@ fun
verb_Category : Category ;
adverb_Category : Category ;
preposition_Category : Category ;
numeral_Category : Category ;
pronoun_Category : Category ;
determiner_Category : Category ;
article_Category : Category ;
number_ParameterType : ParameterType ;
gender_ParameterType : ParameterType ;
@@ -65,6 +69,7 @@ fun
active_Parameter : Parameter ;
passive_Parameter : Parameter ;
middle_Parameter : Parameter ;
present_Parameter : Parameter ;
past_Parameter : Parameter ;
@@ -99,6 +104,9 @@ fun
short_Parameter : Parameter ; -- short form of e.g. a Fin infinitive
long_Parameter : Parameter ;
strong_Parameter : Parameter ; -- German adjective declensions
weak_Parameter : Parameter ;
finite_Modifier : Modifier ;
transitive_Modifier : Modifier ;
nominal_Modifier : Modifier ;

View File

@@ -0,0 +1,9 @@
--# -path=.:alltenses:prelude
resource CombinatorsCze = Combinators with
(Cat = CatCze),
(Structural = StructuralCze),
(Constructors = ConstructorsCze)
** open MissingCze in {}

View File

@@ -0,0 +1,7 @@
--# -path=.:alltenses:prelude:src/hungarian
resource CombinatorsHun = Combinators with
(Cat = CatHun),
(Structural = StructuralHun),
(Noun = NounHun),
(Constructors = ConstructorsHun) ** open MissingHun in {} ;

View File

@@ -0,0 +1,7 @@
--# -path=.:alltenses:prelude:../korean
resource CombinatorsKor = Combinators with
(Cat = CatKor),
(Structural = StructuralKor),
(Noun = NounKor),
(Constructors = ConstructorsKor) ** open MissingKor in {} ;

View File

@@ -0,0 +1,9 @@
--# -path=.:alltenses:prelude
resource CombinatorsSlo = Combinators with
(Cat = CatSlo),
(Structural = StructuralSlo),
(Constructors = ConstructorsSlo)
** open MissingSlo in {}

View File

@@ -0,0 +1,9 @@
--# -path=.:alltenses:prelude
resource CombinatorsTur = Combinators with
(Cat = CatTur),
(Structural = StructuralTur),
(Noun = NounTur),
(Constructors = ConstructorsTur) **
{
}

View File

@@ -1180,6 +1180,8 @@ incomplete resource Constructors = open Grammar in { --%
= \a,p -> TUseQCl TPres a p ; --%
mkQS : (Tense) -> (Ant) -> (Pol) -> QCl -> QS -- who wouldn't have slept
= TUseQCl ; --%
mkQS : Temp -> Pol -> QCl -> QS -- who wouldn't have slept --%
= UseQCl ; --%
-- Since 'yes-no' question clauses can be built from clauses (see below),
-- we give a shortcut

View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude
resource ConstructorsCze = Constructors with (Grammar = GrammarCze)
** open MissingCze in {}

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude:../hungarian
resource ConstructorsHun = Constructors with (Grammar = GrammarHun) ** open MissingHun in {} ;

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude:../korean
resource ConstructorsKor = Constructors with (Grammar = GrammarKor) ** open MissingKor in {} ;

View File

@@ -1,4 +1,4 @@
--# -path=.:alltenses:prelude:../latin
resource ConstructorsLat = Constructors with (Grammar = GrammarLat) **
open MissingLat in {}
open MissingLat in {} ;

View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude
resource ConstructorsSlo = Constructors with (Grammar = GrammarSlo)
** open MissingSlo in {}

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude
resource ConstructorsTur = Constructors with (Grammar = GrammarTur) ;

6
src/api/SymbolicCze.gf Normal file
View File

@@ -0,0 +1,6 @@
--# -path=.:../czech:../common:../abstract:../prelude
resource SymbolicCze = Symbolic with
(Symbol = SymbolCze),
(Grammar = GrammarCze)
** open MissingCze in {}

5
src/api/SymbolicHun.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:../hungarian:../common:../abstract:../prelude
resource SymbolicHun = Symbolic with
(Symbol = SymbolHun),
(Grammar = GrammarHun) ** open MissingHun in {} ;

5
src/api/SymbolicKor.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:../korean:../common:../abstract:../prelude
resource SymbolicKor = Symbolic with
(Symbol = SymbolKor),
(Grammar = GrammarKor) ** open MissingKor in {} ;

View File

@@ -1,5 +1,5 @@
--# -path=.:../icelandic:../common:../abstract:../prelude
--# -path=.:../latin:../common:../abstract:../prelude
resource SymbolicLat = Symbolic with
(Symbol = SymbolLat),
(Grammar = GrammarLat) ;
(Grammar = GrammarLat) ** open MissingLat in {} ;

6
src/api/SymbolicSlo.gf Normal file
View File

@@ -0,0 +1,6 @@
--# -path=.:../slovak:../common:../abstract:../prelude
resource SymbolicSlo = Symbolic with
(Symbol = SymbolSlo),
(Grammar = GrammarSlo)
** open MissingSlo in {}

4
src/api/SyntaxCze.gf Normal file
View File

@@ -0,0 +1,4 @@
--# -path=.:./alltenses:../prelude
instance SyntaxCze of Syntax =
ConstructorsCze, CatCze, StructuralCze, CombinatorsCze ;

4
src/api/SyntaxHun.gf Normal file
View File

@@ -0,0 +1,4 @@
--# -path=.:alltenses:prelude:../hungarian
instance SyntaxHun of Syntax =
ConstructorsHun, CatHun, StructuralHun, CombinatorsHun ;

5
src/api/SyntaxKor.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude:../korean
instance SyntaxKor of Syntax =
ConstructorsKor, CatKor, StructuralKor, CombinatorsKor **
open MissingKor in {} ;

4
src/api/SyntaxSlo.gf Normal file
View File

@@ -0,0 +1,4 @@
--# -path=.:./alltenses:../prelude
instance SyntaxSlo of Syntax =
ConstructorsSlo, CatSlo, StructuralSlo, CombinatorsSlo ;

4
src/api/SyntaxTur.gf Normal file
View File

@@ -0,0 +1,4 @@
--# -path=.:alltenses:prelude
instance SyntaxTur of Syntax = ConstructorsTur, CatTur, StructuralTur, CombinatorsTur ;

13
src/api/TryCze.gf Normal file
View File

@@ -0,0 +1,13 @@
--# -path=.:../czech:../common:../abstract:../prelude
resource TryCze = SyntaxCze, LexiconCze, ParadigmsCze -[mkAdv, mkDet,mkQuant]**
open (P = ParadigmsCze) in {
-- oper
-- mkAdv = overload SyntaxCze {
-- mkAdv : Str -> Adv = P.mkAdv ;
-- } ;
}

3
src/api/TryHun.gf Normal file
View File

@@ -0,0 +1,3 @@
--# -path=.:../hungarian:../common:../abstract:../prelude
resource TryHun = SyntaxHun, LexiconHun, ParadigmsHun - [mkAdv] ;

3
src/api/TryKor.gf Normal file
View File

@@ -0,0 +1,3 @@
--# -path=.:../korean:../common:../abstract:../prelude
resource TryKor = SyntaxKor, LexiconKor, ParadigmsKor - [mkAdv] ;

View File

@@ -1,3 +1,3 @@
--# -path=.:../latin:../common:../abstract:../prelude
resource TryLat = SyntaxLat, LexiconLat, ParadigmsLat - [mkAdv,mkAdN,mkOrd] ;
resource TryLat = SyntaxLat, LexiconLat, ParadigmsLat - [mkAdv,mkAdN,mkOrd,mkNum] ;

View File

@@ -1,3 +1,3 @@
--# -path=.:../russian:../common:../abstract:../prelude
resource TryRus = SyntaxRus, LexiconRus, ParadigmsRus - [mkAdv] ;
resource TryRus = SyntaxRus, LexiconRus, ParadigmsRus - [mkAdv,mkIAdv,mkOrd] ;

13
src/api/TrySlo.gf Normal file
View File

@@ -0,0 +1,13 @@
--# -path=.:../slovak:../common:../abstract:../prelude
resource TrySlo = SyntaxSlo, LexiconSlo, ParadigmsSlo -[mkAdv, mkDet,mkQuant]**
open (P = ParadigmsSlo) in {
-- oper
-- mkAdv = overload SyntaxSlo {
-- mkAdv : Str -> Adv = P.mkAdv ;
-- } ;
}

11
src/api/TryTur.gf Normal file
View File

@@ -0,0 +1,11 @@
--# -path=.:../turkish:../common:../abstract:../prelude
resource TryTur = SyntaxTur, LexiconTur, ParadigmsTur - [mkAdN,mkAdv,mkNum,mkQuant] **
open (P = ParadigmsTur), (R = ResTur) in {
oper
mkAdv = overload SyntaxTur {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
}

View File

@@ -3,7 +3,6 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in {
flags coding = utf8 ;
lin
PositA a = {
s = \\h,g,n,d,c => case h of {
Hum => a.s ! APosit g n d c;
@@ -21,27 +20,27 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in {
-- $SuperlA$ belongs to determiner syntax in $Noun$.
--
ComplA2 a np = {
s = \\sp,g,n,st,c => a.s ! APosit g n st c ++ a.c2.s ++ np.s ! a.c2.c ;
s = \\sp,g,n,st,c => a.s ! APosit g n st c ++ a.c2.s ++ bindIf a.c2.binds ++ np.s ! a.c2.c ;
} ;
--
-- ReflA2 a = {
-- s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ;
-- isPre = False
-- } ;
--
-- SentAP ap sc = {
-- s = \\a => ap.s ! a ++ sc.s ;
-- isPre = False
-- } ;
--
-- full PerGenNum should be added to make this work properly
ReflA2 a = {
s = \\sp,g,n,st,c => a.s ! APosit g n st c ++ a.c2.s ++ reflPron c (gn2pgn {g=g;n=n})
} ;
AdAP ada ap = {
s = \\sp,g,n,st,c => ada.s ++ ap.s ! sp ! g ! n ! st ! c
s = \\sp,g,n,st,c => ap.s ! sp ! g ! n ! st ! c ++ ada.s
} ;
AdvAP,
SentAP = \ap,ss -> AdAP ss ap ;
UseA2 = PositA ;
UseComparA a = {
s = \\h,g,n,d,c => a.s ! AComp d c
s = \\h,g,n,d,c => a.s ! AComp d c
};
-- : Ord -> AP ; -- warmest
AdjOrd ord = {s = \\h,g,n,s,c => ord.s ! g ! s ! c} ;
}

View File

@@ -11,12 +11,12 @@ concrete AdverbAra of Adverb = CatAra ** open ResAra, Prelude in {
-- s = cadv.s ++ a.s ! AAdv ++ "مِنْ" ++ s.s
-- } ;
PrepNP prep np = {s = prep.s ++ np.s ! prep.c} ;
PrepNP prep np = {s = prep.s ++ bindIf (orB np.a.isPron prep.binds) ++ np.s ! prep.c} ;
AdAdv ad av = cc2 av ad ;
AdAdv ad av = cc2 ad av ;
-- : Subj -> S -> Adv ; -- when she sleeps
SubjS subj s = {s = subj.s ++ s.s ! Subord} ;
SubjS subj s = {s = subj.s ++ s.s ! subj.o} ;
-- AdvSC s = s ; --- this rule give stack overflow in ordinary parsing

View File

@@ -13,7 +13,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
SSlash,
S = {s : Order => Str} ; -- subordinate clause has nominal word order and subject in acc
QS = {s : QForm => Str} ;
RS = {s : Agr => Case => Str} ; -- case because the relative pronoun inflects in case
RS = {s : PerGenNum => Case => Str} ; -- case because the relative pronoun inflects in case
-- Sentence
@@ -26,7 +26,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
QCl = ResAra.QCl ; -- {s : Tense => Polarity => QForm => Str} ;
IDet = ResAra.IDet ; -- {s : Gender => State => Case => Str ; n : Number} ;
IP = ResAra.IP ; -- {s : (isPred : Bool) => State => Case => Str ; n : Number} ;
IComp = ResAra.IComp ; --
IComp = ResAra.IComp ; --
IQuant = {s : State => Case => Str} ;
-- Relative
@@ -70,18 +70,19 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
-- Structural
Conj = {s : Str ; n : ResAra.Number} ;
-- DConj = {s1,s2 : Str ; n : ResAra.Number} ;
-- Subj = {s : Str} ;
Conj = {s1,s2 : Str; n : ResAra.Number} ;
Subj = {s : Str ; o : Order} ;
Prep = ResAra.Preposition ;
-- Open lexical classes, e.g. Lexicon
V, VS, VQ, VA = ResAra.Verb ; -- = {s : VForm => Str} ;
V2, V2A = ResAra.Verb2 ;
VV = ResAra.Verb2 ** {sc : Preposition} ;
V2S, V2Q = ResAra.Verb2 ;
V2V, V3 = ResAra.Verb3 ;
V, VQ, VA = ResAra.Verb ; -- = {s : VForm => Str} ;
VV = ResAra.Verb ** {s2 : Str ; sc : Preposition} ; -- s2 is complementiser
V2, V2A, V2Q = ResAra.Verb2 ;
V2V = ResAra.Verb2 ** {s2 : Str ; sc : Preposition} ; -- s2 is complementiser, c2 is for dir.obj
V2S = ResAra.Verb2 ** {s2 : Str ; o : Order} ;
VS = ResAra.Verb ** {s2 : Str ; o : Order} ;
V3 = ResAra.Verb3 ;
A = ResAra.Adj ;
A2 = ResAra.Adj2 ;
@@ -95,6 +96,6 @@ linref
CN = \cn -> uttCN cn ! Masc ;
N = \n -> uttCN (useN n) ! Masc ;
VP = \vp -> uttVP vp ! Masc ;
VP = \vp -> uttVP VPPerf vp ! Masc ;
}

View File

@@ -1,11 +1,12 @@
concrete ConjunctionAra of Conjunction =
concrete ConjunctionAra of Conjunction =
CatAra ** open ResAra, Coordination, Prelude in {
lincat
[S] = {s1,s2 : Order => Str} ;
[Adv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : Case => Str ; a : Agr ; empty : Str} ;
[NP] = {s1,s2 : Case => Str ; a : Agr ; empty : Str; isHeavy : Bool} ;
[CN] = {s1,s2 : NTable ; g : Gender ; h : Species ; isDual : Bool ; np : Case => Str ; isHeavy : Bool} ;
[AP] = {s1,s2 : Species => Gender => Number => State => Case => Str} ;
lin
@@ -13,32 +14,38 @@ lin
BaseAdv = twoSS ;
ConsAdv = consrSS comma ;
ConjAdv = conjunctSS ;
ConjAdv = conjunctDistrSS ;
BaseS = twoTable Order ;
ConsS = consrTable Order comma ;
ConjS = conjunctTable Order ;
ConjS = conjunctDistrTable Order ;
BaseNP x y = twoTable Case x y ** {
a = conjAgr x.a y.a ;
empty = []
BaseNP x y = emptyNP ** twoTable Case x y ** {
a = conjAgr x.a y.a
} ;
ConsNP xs x = consrTable Case comma xs x ** {
a = conjAgr xs.a x.a ;
empty = []
ConsNP xs x = emptyNP ** consrTable Case comma xs x ** {
a = conjAgr xs.a x.a
} ;
ConjNP conj ss = conjunctTable Case conj ss ** {
a = let gn = pgn2gn ss.a.pgn in
{pgn = Per3 gn.g (conjNumber conj.n gn.n) ; isPron = False} ;
empty = []
ConjNP conj ss = emptyNP ** conjunctDistrTable Case conj ss ** {
a = let gn = pgn2gn ss.a.pgn in
{pgn = Per3 gn.g (conjNumber conj.n gn.n) ; isPron = False}
} ;
BaseAP = twoTable5 Species Gender Number State Case ;
ConsAP = consrTable5 Species Gender Number State Case comma ;
ConjAP = conjunctTable5 Species Gender Number State Case ;
ConjAP = conjunctDistrTable5 Species Gender Number State Case ;
BaseCN cn1 cn2 = leanCN cn1 ** twoTable3 Number State Case (leanCN cn1) (leanCN cn2) ;
ConsCN cn cns = leanCN cn ** consrTable3 Number State Case comma (leanCN cn) cns ;
ConjCN conj cns = cns ** conjunctDistrTable3 Number State Case conj cns ;
oper
leanCN : CN -> CN = \cn -> cn ** {
np = \\_ => [] ;
s = \\n,s,c => cn2str cn n s c
} ;
conjAgr : Agr -> Agr -> Agr = \a,b -> {
isPron = False ;
pgn = let gnA = pgn2gn a.pgn ; gnB = pgn2gn b.pgn in
@@ -53,30 +60,25 @@ oper
-- move to predef?
ListTable5 : PType -> PType -> PType -> PType -> PType -> Type = \P,Q,R,T,S ->
{s1,s2 : P => Q => R => T => S => Str} ;
ListTable5 : PType -> PType -> PType -> PType -> PType -> Type = \P,Q,R,T,S ->
{s1,s2 : P => Q => R => T => S => Str} ;
twoTable5 : (P,Q,R,T,S : PType) -> (_,_ : {s : P => Q => R => T => S => Str}) ->
ListTable5 P Q R T S =
twoTable5 : (P,Q,R,T,S : PType) -> (_,_ : {s : P => Q => R => T => S => Str}) ->
ListTable5 P Q R T S =
\_,_,_,_,_,x,y ->
{s1 = x.s ; s2 = y.s} ;
{s1 = x.s ; s2 = y.s} ;
consrTable5 :
(P,Q,R,T,S : PType) -> Str -> {s : P => Q => R => T => S => Str} ->
consrTable5 :
(P,Q,R,T,S : PType) -> Str -> {s : P => Q => R => T => S => Str} ->
ListTable5 P Q R T S -> ListTable5 P Q R T S =
\P,Q,R,T,S,c,x,xs ->
{s1 = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ c ++ xs.s2 ! p ! q ! r ! t ! s ;
{s1 = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ c ++ xs.s2 ! p ! q ! r ! t ! s ;
s2 = x.s
} ;
} ;
conjunctTable5 :
(P,Q,R,T,S : PType) -> Conjunction -> ListTable5 P Q R T S -> {s : P => Q => R => T => S => Str} =
conjunctDistrTable5 :
(P,Q,R,T,S : PType) -> ConjunctionDistr -> ListTable5 P Q R T S ->
{s : P => Q => R => T => S => Str} =
\P,Q,R,T,S,or,xs ->
{s = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ or.s ++ xs.s2 ! p ! q ! r ! t ! s} ;
-- conjunctDistrTable5 :
-- (P,Q,R,T,S : PType) -> ConjunctionDistr -> ListTable5 P Q R T S ->
-- {s : P => Q => R => T => S => Str} =
-- \P,Q,R,T,S,or,xs ->
-- {s = \\p,q,r,t,s => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ;
{s = \\p,q,r,t,s => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ;
}

View File

@@ -1,4 +1,4 @@
concrete ConstructionAra of Construction = CatAra ** open
concrete ConstructionAra of Construction = CatAra ** open
Prelude,
ParadigmsAra,
SyntaxAra,
@@ -7,7 +7,7 @@ concrete ConstructionAra of Construction = CatAra ** open
(E=ExtendAra),
(R=ResAra),
(L=LexiconAra) in {
lincat
Timeunit = N ;
Weekday = N ;
@@ -17,18 +17,25 @@ lincat
lin
timeunitAdv n time =
timeunitAdv n time =
let n_card : Card = n ;
n_hours_NP : NP = mkNP n_card time ;
in SyntaxAra.mkAdv during_Prep n_hours_NP | ParadigmsAra.mkAdv (n_hours_NP.s ! R.Nom) ;
-- random guesses
weekdayPunctualAdv w = SyntaxAra.mkAdv on_Prep (mkNP w) ; -- on Sunday
weekdayHabitualAdv w = SyntaxAra.mkAdv on_Prep (mkNP w) ; -- on Sundays
weekdayNextAdv w = SyntaxAra.mkAdv on_Prep (mkNP w) ; -- next Sunday
weekdayLastAdv w = SyntaxAra.mkAdv on_Prep (mkNP w) ; -- last Sunday
weekdayPunctualAdv w = ParadigmsAra.mkAdv ((mkNP w).s ! R.Nom) ; -- on Sunday
-- weekdayPunctualAdv w = SyntaxAra.mkAdv noPrep (mkNP w) ; -- on Sunday
-- TODO
weekdayHabitualAdv, -- on Sundays
weekdayNextAdv, -- next Sunday
weekdayLastAdv = weekdayPunctualAdv ; -- last Sunday
monthAdv january =
let january_CN : CN = mkCN month_Timeunit (mkNP (mkPN january)) ;
january_NP : NP = R.emptyNP **
{s = \\c => R.cn2str january_CN R.Sg R.Const c ;
a = {pgn = R.Per3 january_CN.g R.Sg ; isPron = False}} ;
in SyntaxAra.mkAdv R.biPrep january_NP ;
monthAdv m = SyntaxAra.mkAdv in_Prep (mkNP m) ;
yearAdv y = SyntaxAra.mkAdv in_Prep y ;
-- dummy
@@ -39,34 +46,51 @@ lin
intYear = symb ;
intMonthday = symb ;
-- n_units_AP
-- : Card -> CN -> A -> AP
n_units_AP card cn a =
let ap = mkAP a in ap ** {
s = \\s,g,n,d,c =>
ap.s ! s ! g ! n ! d ! c
++ (mkAdv R.biPrep (mkNP amount_N)).s
++ (mkNP card cn).s ! R.Bare ---- ? /IL
} ;
oper
amount_N : N = mkN "مِقْدَار" "مَقَادِير" masc nohum ;
-- hack used in the name constructions
toNP : Bool -> NP -> NP = \b -> if_then_else NP b R.emptyNP ;
lin
-- : NP -> NP -> Cl
have_name_Cl np nm =
have_name_Cl np nm =
let subjPron : Pron = R.np2pron np ;
me : NP = toNP np.a.isPron np ;
myName : NP = E.ApposNP me (mkNP (mkDet subjPron) L.name_N) ;
in mkCl myName nm ;
-- : NP -> QCl
what_name_QCl np =
what_name_QCl np =
let subjPron : Pron = R.np2pron np ;
me : R.NP = toNP np.a.isPron np ;
myName : NP = E.ApposNP me (mkNP (mkDet subjPron) L.name_N) ;
what_IP : R.IP = R.mkIP "مَا هُوَ" R.Sg ;
in mkQCl what_IP myName ;
-- how_old_QCl
how_old_QCl np =
let subjPron : Pron = R.np2pron np ;
me : R.NP = toNP np.a.isPron np ;
age_N = mkN "عُمر" ;
myAge : NP = E.ApposNP me (mkNP (mkDet subjPron) L.name_N) ;
in mkQCl what_IP myAge ;
-- hungry_VP =
-- thirsty_VP =
hungry_VP = mkVP hungry_A ;
thirsty_VP = mkVP thirsty_A ;
oper
hungry_A = mkA "جءع" "فَاعِل" ;
thirsty_A = mkA True "عطش" "فَعْلَان" "فَعْلَى" ;
lincat Language = N ;
lin InLanguage l = mkAdv in_Prep (mkNP l) ;
@@ -91,31 +115,31 @@ oper mkLanguage : Str -> N = mkN ;
lin second_Timeunit = mkN "second" ;
lin minute_Timeunit = mkN "minute" ;
lin hour_Timeunit = mkN "hour" ;
lin day_Timeunit = mkN "day" ;
lin day_Timeunit = mkN "يَوْم" ;
lin week_Timeunit = mkN "week" ;
lin month_Timeunit = mkN "month" ;
lin month_Timeunit = mkN "شَهْر" "أَشْهُر" masc nohum ;
lin year_Timeunit = mkN "year" ;
lin monday_Weekday = mkN "Monday" ;
lin tuesday_Weekday = mkN "Tuesday" ;
lin wednesday_Weekday = mkN "Wednesday" ;
lin thursday_Weekday = mkN "Thursday" ;
lin friday_Weekday = mkN "Friday" ;
lin saturday_Weekday = mkN "Saturday" ;
lin sunday_Weekday = mkN "Sunday" ;
lin monday_Weekday = mkN day_Timeunit (mkN "إثْنَيْن") ;
lin tuesday_Weekday = mkN day_Timeunit (mkN "ثُلَاثَاء") ;
lin wednesday_Weekday = mkN day_Timeunit (mkN "أَرْبَعَاء") ;
lin thursday_Weekday = mkN day_Timeunit (mkN "خَمِيس") ;
lin friday_Weekday = mkN day_Timeunit (mkN "جُمْعَة") ;
lin saturday_Weekday = mkN day_Timeunit (mkN "سَبْت") ;
lin sunday_Weekday = mkN day_Timeunit (mkN "أَحَد") ;
lin january_Month = mkN "January" ;
lin february_Month = mkN "February" ;
lin march_Month = mkN "March" ;
lin april_Month = mkN "April" ;
lin may_Month = mkN "May" ;
lin june_Month = mkN "June" ;
lin july_Month = mkN "July" ;
lin august_Month = mkN "August" ;
lin september_Month = mkN "September" ;
lin october_Month = mkN "October" ;
lin november_Month = mkN "November" ;
lin december_Month = mkN "December" ;
lin january_Month = mkN (mkN "كَانُون") (mkAP (mkOrd (mkNumeral n2_Unit))) ;
lin february_Month = mkN "شُبَاط" ;
lin march_Month = mkN "آذَار" ;
lin april_Month = mkN "نَيْسَان" ;
lin may_Month = mkN "أَيَّار" ;
lin june_Month = mkN "حَزِيرَان" ;
lin july_Month = mkN "تَمُّوز" ;
lin august_Month = mkN "آب" ;
lin september_Month = mkN "أَيْلُول" ;
lin october_Month = mkN (mkN "تِشْرِين") (mkAP (mkOrd (mkNumeral n1_Unit))) ;
lin november_Month = mkN (mkN "تِشْرِين") (mkAP (mkOrd (mkNumeral n2_Unit))) ;
lin december_Month = mkN (mkN "كَانُون") (mkAP (mkOrd (mkNumeral n1_Unit))) ;
-- lin afrikaans_Language = mkLanguage "Afrikaans" ;
-- lin amharic_Language = mkLanguage "Amharic" ;
@@ -140,7 +164,7 @@ lin finnish_Language = mkLanguage "فِنْلَنْدِيّة" ;
-- lin maltese_Language = mkLanguage "Maltese" ;
-- lin nepali_Language = mkLanguage "Nepali" ;
-- lin norwegian_Language = mkLanguage "Norwegian" ;
lin nprsian_Language = mkLanguage "فَارِسيّة" ;
lin persian_Language = mkLanguage "فَارِسيّة" ;
-- lin polish_Language = mkLanguage "Polish" ;
-- lin punjabi_Language = mkLanguage "Punjabi" ;
-- lin romanian_Language = mkLanguage "Romanian" ;

View File

@@ -2,42 +2,88 @@
concrete ExtendAra of Extend =
CatAra ** ExtendFunctor - [
GenNP, SlashBareV2S, PredAPVP, GenModNP, ExistsNP,
StrandRelSlash, ExistPluralCN, ExistMassCN, ExistCN, EmptyRelSlash, DetNPMasc, DetNPFem,
ComplBareVS, ComplDirectVS, ComplDirectVQ,
ICompAP,
VPS, MkVPS,
ApposNP
GenNP, ApposNP, ICompAP, DetNPMasc, DetNPFem,
EmptyRelSlash, PredAPVP,
ComplDirectVS, ComplDirectVQ, -- because of Utt
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
EmbedSSlash, AdjAsNP
]
with (Grammar=GrammarAra)
** open
Prelude,
ResAra,
ParamX
Prelude,
ParadigmsAra,
RelativeAra,
Coordination
in {
lin
GenNP np = {s = \\_,_,_,_ => np.s ! Gen ; d = Const ; isNum,isPron,is1sg = False} ;
lin
-- If the NP is a pronoun, just use PossPron
GenNP np = case np.a.isPron of {
True => Grammar.PossPron (pgn2pron np.a.pgn) ;
False => let g = np.s ! Gen in mkQuant3 g g g Const
} ;
-- : NP -> NP -> NP
ApposNP np1 np2 = np2 ** {s = \\c => np1.s ! c ++ np2.s ! c} ;
-- : NP -> NP -> NP
ApposNP np1 np2 = np2 ** {s = \\c => np1.s ! c ++ np2.s ! c} ;
-- : AP -> IComp ; -- "how old"
ICompAP ap = {s = \\gn => "كَمْ" ++ ap.s ! NoHum ! gn.g ! gn.n ! Indef ! Acc} ;
-- : AP -> IComp ; -- "how old"
ICompAP ap = {s = \\gn => "كَمْ" ++ ap.s ! NoHum ! gn.g ! gn.n ! Indef ! Acc} ;
lincat
-- : AP -> VP -> Cl ; -- it is good to walk
PredAPVP ap vp =
let isGood : Str = "مِنَ" ++ ap.s ! Hum ! Masc ! Sg ! Def ! Gen ;
toWalk : Str = "ال" ++ BIND ++ (uttVP VPGer vp ! Masc) ; -- TODO: Masdar into NForm=>Str?
goodToWalk_Adv : Adv = lin Adv {s = isGood ++ toWalk} ;
in PredVP emptyNP (UseComp (CompAdv goodToWalk_Adv)) ;
VPS = VP ; -- finite VP's with tense and polarity
-- : Det -> NP
DetNPMasc det = emptyNP ** {s = det.s ! NoHum ! Masc} ;
DetNPFem det = emptyNP ** {s = det.s ! NoHum ! Fem} ;
-- : AP -> NP
AdjAsNP ap =
let adjAsN : Noun = {
s = ap.s ! NoHum ! Masc ;
s2 = emptyNTable ;
g = Masc ;
h = NoHum ;
isDual = False } ;
in MassNP (UseN adjAsN) ;
-- : ClSlash -> RCl -- he lives in
EmptyRelSlash = RelSlash (IdRP ** {s = \\_ => []}) ;
-- : SSlash -> SC
EmbedSSlash = Grammar.EmbedS ;
lincat
VPS = {s : PerGenNum => Str} ; -- finite VP's with tense and polarity
[VPS] = {s1,s2 : PerGenNum => Str} ;
lin
-- : Temp -> Pol -> VP -> VPS ; -- hasn't slept
MkVPS t p vp = {
s = \\pgn => let vps =
wordOrderNoSubj
Nominal -- Nominal (=SVO) generalises best for ConjVPS.
vp.obj.a.isPron
(vStr vp pgn t.t p.p Nominal)
vp.obj.s -- BIND is taken care of when the VP was made, no need to add one here
(pred vp pgn t.t p.p)
vp.s2
in vps.before ++ vps.after -- word order is SVO, so this is safe for just this case.
} ;
-- maybe more robust to use إِيَّا as object carrier if the VPS
-- consists of several VPSs; like it's done in Slash3V3 /IL
BaseVPS = twoTable PerGenNum ;
ConsVPS = consrTable PerGenNum comma ;
ConjVPS = conjunctDistrTable PerGenNum ;
PredVPS np vps = {
s = \\_ => np.s ! Nom ++ vps.s ! np.a.pgn -- first quick version with order always Nominal.
} ; -- if necessary, change VPS into {s : PerGenNum => Order => {before,after : Str}}
lin
-- : Temp -> Pol -> VP -> VPS ; -- hasn't slept
MkVPS t p vp = lin VPS (vp ** {
s = \\pgn,vf => case <t.t,t.a> of { --- IL guessed tenses
<(Pres|Fut),Simul> => vp.s ! pgn ! VPImpf Ind ;
<Cond,_ > => vp.s ! pgn ! VPImpf Cnj ;
<_ ,_ > => vp.s ! pgn ! VPPerf
}
}) ;
}

View File

@@ -9,32 +9,38 @@ concrete IdiomAra of Idiom = CatAra ** open
lin
-- : VP -> Cl ; -- it is hot
ImpersCl vp =
let it : ResAra.NP = pron2np (pgn2pron vp.obj.a.pgn) ; -- if no obj, Per3 Masc Sg chosen by default
-- "it is a girl" becomes "she is a girl";
-- "it is twins" becomes "they<dual> are<dual> twins".
ImpersCl vp = -- if no obj, default Per3 Masc Sg
let it : ResAra.NP = gn2pron vp.obj.a.gn ;
in predVP it vp ;
-- : VP -> Cl ; -- one sleeps
GenericCl = predVP (regNP "المَرْء" Sg) ;
GenericCl = predVP (regNP "المَرْء" Sg Def) ;
-- : NP -> RS -> Cl ; -- it is I who did it
--CleftNP np rs =
-- : Adv -> S -> Cl ; -- it is here she slept
CleftAdv adv s =
let comp : Comp = CompAdv adv in
predVP he_Pron (UseComp comp) ;
let comp : Comp = CompAdv (lin Adv {s = adv.s ++ s.s ! Verbal}) ; -- no idea about word order /IL
pass_V = mkV "مضي" va vi ; -- switch to copula or some other verb if better /IL
in predVP emptyNP (UseV pass_V ** {vtype=Copula ; pred=comp}) ; -- very hacky /IL
-- : NP -> Cl ; -- there is a house
ExistNP np =
predVP (emptyNP ** {s=\\c=>"هُنَاكَ"}) (UseComp (CompNP np)) ; -- IL
predVP (indeclNP "هُنَاكَ" Sg) (UseComp (CompNP np)) ; -- IL
-- ExistIP : IP -> QCl ; -- which houses are there
-- : IP -> QCl ; -- which houses are there
ExistIP ip = let cl = ExistNP (ip2np ip False) in {
s = \\t,p,q => cl.s ! t ! p ! Nominal -- IL guessed
} ;
-- 7/12/2012 generalizations of these
-- : NP -> Adv -> Cl ; -- there is a house in Paris
ExistNPAdv np adv =
predVP (emptyNP ** {s=\\c=>"هُنَاكَ"}) (AdvVP (UseComp (CompNP np)) adv) ; -- IL
predVP (indeclNP "هُنَاكَ" Sg) (AdvVP (UseComp (CompNP np)) adv) ; -- IL
-- ExistIPAdv : IP -> Adv -> QCl ; -- which houses are there in Paris

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common:../api:../prelude
concrete LangAra of Lang =
concrete LangAra of Lang =
GrammarAra,
LexiconAra,
ConstructionAra
@@ -9,5 +9,3 @@ concrete LangAra of Lang =
flags startcat = Phr ; unlexer = text ; lexer = text ; coding = utf8 ;
}

View File

@@ -11,15 +11,14 @@ flags
lin
airplane_N = sdfN "طءر" "فاعِلة" Fem NoHum ;
answer_V2S = dirV2 (v3 "جوب") ;
answer_V2S = mkV2S (v3 "جوب") ;
apartment_N = brkN "شقّ" "فِعّة" "فِعَل" Fem NoHum ;
apple_N = sdfN "تفح" "فِعّالة" Fem NoHum ;
art_N = brkN "فنن" "فَعّ" "فُعُول" Masc NoHum ;
ask_V2Q = dirV2 (regV "يَسءَل") ;
-- ask_V2Q = dirV2 (v1 "سءل" a a) ;
baby_N = brkN "طفل" "فِعل" "أَفعَال" Masc Hum;
-- bad_A = sndA "سوء" "فَيِّع" ;
bad_A = degrA "سَيِّئ" "سَيِّئَة" "سَيِّئِين" ;
bad_A = sndA "سوء" "فَيِّع" ;
bank_N = brkN "بنك" "فَعل" "فُعُول" Masc NoHum ;
beautiful_A = sndA "جمل" "فَعِيل" ;
become_VA = mkVA (v4 "صبح") ;
@@ -73,7 +72,7 @@ flags
door_N = brkN "بوب" "فاع" "أَفعَال" Masc NoHum ;
drink_V2 = dirV2 (regV "شَرِب") ;
-- drink_V2 = dirV2 (v1 "شرب" i a) ;
easy_A2V = mkA2 (sndA "سهل" "فَعل") datPrep ;
easy_A2V = mkA2 (sndA "سهل" "فَعل") liPrep ;
eat_V2 = dirV2 (mkV "ءكل" FormI) ;
empty_A = sndA "فرغ" "فاعِل" ;
enemy_N = brkN "عدو" "فَعُلّ" "أَفعَاء" Masc Hum ;
@@ -133,7 +132,7 @@ flags
meat_N = brkN "لحم" "فَعلة" "فُعُول" Masc NoHum ;
milk_N = brkN "حلب" "فَعِيل" "فَعِيل" Masc NoHum ; --no plur
moon_N = brkN "قمر" "فَعَل" "أَفعَال" Masc NoHum ;
mother_N2 = mkN2 (sdfN "ءم" "فُعَّ" Fem Hum) ;
mother_N2 = mkN2 (mkN "أُمّ" "أُمَّات" Fem Hum) ;
mountain_N = brkN "جبل" "فَعَل" "فِعَال" Masc NoHum ;
music_N = mkN (reg "مُوسِيقَى" "مُوسِيقَى") Fem NoHum ; --no plur
narrow_A = sndA "ضيق" "فَعِّل" ;
@@ -143,7 +142,7 @@ flags
old_A = sndA "قدم" "فَعِيل" ;
open_V2 = dirV2 (regV "يَفتَح") ;
-- open_V2 = dirV2 (v1 "فتح" a a ) ;
paint_V2A = mkV2A (regV "يَدهَن" ) [] ;
paint_V2A = dirV2 (regV "يَدهَن" ) ;
-- paint_V2A = mkV2A (v1 "دهن" a a ) [] ;
paper_N = brkN "ورق" "فَعَلة" "أَفعَال" Fem NoHum ;
paris_PN = mkPN "بارِيس" Fem NoHum ;
@@ -203,7 +202,7 @@ flags
switch8off_V2 = dirV2 (v4 "طفء") ;
switch8on_V2 = dirV2 (v4 "شعل") ;
table_N = sdfN "طول" "فاعِلة" Fem NoHum ;
talk_V3 = mkV3 (v5 "حدث") datPrep (mkPrep "عَن") ;
talk_V3 = mkV3 (v5 "حدث") liPrep (mkPrep "عَن") ;
teacher_N = sdmN "علم" "مُفَعِّل" Masc Hum ; --mucal~imö
teach_V2 = dirV2 (v2 "علم") ;
television_N = mkN (sndf "تِلِفِزيُون") Masc NoHum ;

View File

@@ -3,11 +3,7 @@ resource MissingAra = open GrammarAra, Prelude in {
-- temporary definitions to enable the compilation of RGL API
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
oper AdjOrd : Ord -> AP = notYet "AdjOrd" ;
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
@@ -15,32 +11,18 @@ oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
oper DetNP : Det -> NP = notYet "DetNP" ;
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
oper EmbedS : S -> SC = notYet "EmbedS" ;
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
oper PConjConj : Conj -> PConj = notYet "PConjConj" ;
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
oper VocNP : NP -> Voc = notYet "VocNP" ;
oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ;
}

File diff suppressed because it is too large Load Diff

View File

@@ -6,48 +6,60 @@ lin
DetCN det cn = let {
cas : Case -> Case = if_then_else Case det.is1sg Bare ;
number = case cn.isDual of {True => Dl ; _ => sizeToNumber det.n} ;
number = case cn.isDual of {
True =>
case sizeToNumber det.n of {
Sg => Sg ;
_ => Dl } ;
False => sizeToNumber det.n } ;
determiner : Case -> Str = \c ->
det.s ! cn.h ! (detGender cn.g det.n) ! c ;
noun : Case -> Str = \c ->
cn.s ! number
! nounState det.d number
det.s ! cn.h ! detGender cn.g det.n ! c ;
noun : Case -> Str = \c ->
cn.s ! number
! nounState det.d number
! nounCase c det.n det.d ;
adj : Case -> Str = \c ->
cn.s2 ! number
! (definite ! det.d) -- Indef remains Indef, rest become Def
! c
} in {
s = \\c =>
case cnB4det det.isPron det.isNum det.n det.d of {
False => determiner c
++ noun c
++ adj c
++ cn.np ! c ;
True => noun (cas c) -- deal with possessive suffix
++ determiner c -- (nounCase c det.n det.d) --??
++ adj c
++ cn.np ! c
};
} in emptyNP ** {
s = \\c => -- Dat is just a hack for liPrep
let c' = case c of {Dat => Gen ; x => x} in
case cnB4det det of {
False => determiner c'
++ noun c'
++ adj c'
++ cn.np ! c' ;
True => noun (cas c) -- deal with possessive suffix + dative hack
++ determiner c'
++ adj c'
++ cn.np ! c'
};
a = { pgn = agrP3 cn.h cn.g number;
isPron = False } ;
empty = []
};
isHeavy = cn.isHeavy
} ;
UsePN pn = {
s = pn.s;
a = {pgn = Per3 pn.g Sg ; isPron = False} ;
empty = []
UsePN pn = emptyNP ** {
s = pn.s;
a = {pgn = Per3 pn.g Sg ; isPron = False}
};
UsePron p = p ;
DetNP det = emptyNP ** {s = det.s ! NoHum ! Masc} ; ----
DetNP det = case det.isEmpty of {
True => case <det.d,det.n> of { -- if the s field is empty, make up some other determiner
<Def,One> => he_Pron ;
<Def,_> => theyMasc_Pron ;
<Indef,One> => emptyNP ** {s = someSg_Det.s ! NoHum ! Masc} ;
_ => emptyNP ** {s = somePl_Det.s ! NoHum ! Masc}
} ;
False => emptyNP ** {s = det.s ! NoHum ! Masc} } ;
PredetNP pred np = np ** {
s = \\c => case pred.isDecl of {
True => pred.s!c ++ np.s ! Gen ; -- akvaru l-awlAdi
False => pred.s!c ++ np.s ! c
PredetNP det np = np ** {
s = \\c => case det.isDecl of {
True => det.s ! c ++ bindIf np.a.isPron ++ np.s ! Gen ; -- akvaru l-awlAdi
False => det.s ! c ++ np.s ! c
} ;
a = np.a ** {isPron=False}
} ;
@@ -64,22 +76,23 @@ lin
-}
AdvNP np adv = np ** {
s = \\c => np.s ! c ++ adv.s
s = \\c => np.s ! c ++ adv.s ;
isHeavy = True ;
};
DetQuantOrd quant num ord = quant ** {
s = \\h,g,c => let d = toDef quant.d num.n in
quant.s ! Pl ! h ! g ! c
quant.s ! Pl ! h ! g ! c -- TODO what is this Pl? Was there when I started /IL
++ num.s ! g ! d ! c
--FIXME check this:
++ ord.s ! g
++ ord.s ! g
! case d of {Poss => Def ; _ => d}
! c ;
n = num.n;
isNum = orB num.isNum ord.isNum ;
isNum = orB num.isNum ord.isNum ;
-- ord may come from OrdDigits or OrdNumeral
-- num may come from NumCard : Card -> Num
isEmpty = False
} ;
DetQuant quant num = quant ** {
@@ -90,15 +103,18 @@ lin
case num.n of {
None => False;
_ => num.isNum
}
} ;
isEmpty =
case quant.isEmpty of {
True => notB num.isNum ;
_ => False }
} ;
PossPron p = {
s = \\_,_,_,_ => p.s ! Gen;
PossPron p = baseQuant ** {
s = \\_,_,_,_ => BIND ++ p.s ! Gen;
d = Poss;
is1sg = case p.a.pgn of { Per1 Sing => True ; _ => False } ;
isPron = True;
isNum = False } ;
is1sg = is1sg p.a ;
isPron = p.a.isPron} ;
NumSg = {
s = \\_,_,_ => [] ;
@@ -149,49 +165,72 @@ lin
DefArt = {
s = \\_,_,_,_ => [];
d = Def ;
isNum,isPron,is1sg = False
isNum,isPron,is1sg = False ;
isEmpty = True
} ;
IndefArt = {
s = \\_,_,_,_ => [];
d = Indef ;
isNum,isPron,is1sg = False
isNum,isPron,is1sg = False ;
isEmpty = True
} ;
MassNP cn =
{s = \\c => cn2str cn Sg Indef c ;
a = {pgn = Per3 cn.g Sg ; isPron = False} ;
empty = []} ;
MassNP cn = emptyNP ** {
s = \\c => cn2str cn Sg Indef c ;
a = {pgn = Per3 cn.g Sg ; isPron = False} ;
isHeavy = cn.isHeavy ;
} ;
UseN,
UseN2 = useN ;
Use2N3 n3 = n3 ;
Use3N3 n3 = n3 ** {c2 = n3.c3} ;
ComplN2 n2 np = UseN n2 ** {np=np.s} ;
ComplN2 n2 np = UseN n2 ** {
np = \\c => n2.c2.s ++ bindIf n2.c2.binds ++ np.s ! n2.c2.c
} ;
ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ;
AdjCN ap cn = cn ** {
s2 = \\n,d,c => cn.s2 ! n ! d ! c ++ ap.s ! cn.h ! cn.g ! n ! (definite ! d) ! c
s2 = \\n,d,c => cn.s2 ! n ! d ! c ++ ap.s ! cn.h ! cn.g ! n ! (definite ! d) ! c
};
RelCN cn rs = cn ** {
s2 = \\n,s,c => cn.s2 ! n ! s ! c ++ rs.s ! {pgn=Per3 cn.g n ; isPron=False} ! c};
s2 = \\n,s,c => cn.s2 ! n ! s ! c
++ rs.s ! Per3 cn.g n ! c ;
isHeavy = True
} ;
RelNP np rs = np ** {s = \\c => np.s ! c ++ rs.s ! np.a ! c} ;
RelNP np rs = np ** {
s = \\c => np.s ! c ++ rs.s ! np.a.pgn ! c ;
isHeavy = True
} ;
AdvCN,
SentCN = \cn,ss -> cn ** {s2 = \\n,d,c => cn.s2 ! n ! d ! c ++ ss.s} ;
SentCN = \cn,ss -> cn ** {
np = \\c => cn.np ! c ++ ss.s ;
isHeavy = True
} ;
ApposCN cn np = cn ** { np = \\c => cn.np ! c ++ np.s ! c } ;
ApposCN cn np = cn ** {
np = \\c => cn.np ! c ++ np.s ! c
} ;
-- : CN -> NP -> CN ; -- house of Paris, house of mine
PossNP cn np = cn ** {
s = \\n,_d,c => cn.s ! n ! Const ! c ;
s2 = \\n,_d,c => cn.s2 ! n ! Const ! c ;
np = \\c => cn.np ! c ++ np.s ! Gen
s = \\n,d,c => cn.s ! n ! case d of {Poss=>d ; _=>Const} ! c ;
s2 = \\n,d,c => cn.s2 ! n ! case d of {Poss=>d ; _=>Const} ! Gen ;
np = \\c => cn.np ! c
++ case is1sg np.a of {
True => "لَدَي" ++ np.empty ;
False =>
case np.a.isPron of {
True => "لَدَي" ++ BIND ++ np.s ! Gen ;
False => np.s ! Gen }
}
};
-- : CN -> NP -> CN ; -- glass of wine

View File

@@ -27,7 +27,7 @@ lincat
lin n5 = num3_10 "خَمس" "خامِس";
lin n6 = num3_10 "سِتّ" "سادِس";
lin n7 = num3_10 "سَبع" "سابِع";
lin n8 = num3_10 "ثَمانِي" "ثامِن";
lin n8 = num3_10 "ثَمَانِي" "ثامِن";
lin n9 = num3_10 "تِسع" "تاسِع";
lin pot01 = mkNum "واحِد" "أَوَّل" "أُولى" ** { n = One } ;

View File

@@ -6,8 +6,16 @@ oper
vow : pattern Str = #("َ" | "ِ" | "ُ" | "ً" | "ٍ" | "ٌ") ;
vstar : pattern Str = #("َ"|"ِ"|"ُ"|"ً"|"ٍ"|"ٌ"|"ْ"|"ا"|"ي"|"و") ; -- long or short vowels
astar : pattern Str = #("َ"|"ً"|"ا") ; -- a: short, nunated or long
istar : pattern Str = #("ِ"|"ي"|"يْ") ; -- i: short, long or long with sukun
ustar : pattern Str = #("ُ"|"و"|"وْ") ; -- u: short, long or long with sukun
weak : pattern Str = #("و"|"ي") ;
hamzaseat : pattern Str = #("أ"|"ؤ"|"ئ") ;
-- "Sun letters": assimilate with def. article
sun : pattern Str = #("ت"|"ث"|"د"|"ذ"|"ر"|"ز"|"س"|"ش"|"ص"|"ض"|"ط"|"ظ"|"ل"|"ن") ;
@@ -30,19 +38,19 @@ oper
rectifyHmz : Str -> Str = \word ->
case word of {
l@(""|"ال") + ("أ"|"أَ") + #hamza + "ْ" + tail => l + "آ" + tail;
l@(""|"ال") + ("أ"|"أَ") + #hamza + tail => l + "آ" + tail;
l@(""|"ل"|"ال") + ("أ"|"أَ") + #hamza + "ْ" + tail => l + "آ" + tail;
l@(""|"ل"|"ال") + ("أ"|"أَ") + #hamza + tail => l + "آ" + tail;
l@(""|"ال") + #hamza + v@("َ"|"ُ") + tail => l + "أ" + v + tail;
l@(""|"ال") + #hamza + v@("ِ") + tail => l + "إ" + v + tail;
head + v1@(#vow|"ْ"|"ا"|"ي"|"و")
+ #hamza + v2@(#vow|"ْ") + tail =>
head + v1@#vstar
+ #hamza + v2@(#vow|"ْ") + tail =>
case v2 of { "ْ" => head + v1 + bHmz v1 v2 + tail ; -- unsure about this /IL
_ => head + v1 + bHmz v1 v2 + v2 + tail } ;
head + v1@(#vow|"ْ"|"ا"|"ي"|"و") -- the same but it ends in vowel
head + v1@#vstar -- the same but it ends in vowel
+ #hamza + v2@(#vow|"ْ") =>
case v2 of { "ْ" => head + v1 + tHmz v1 ;
_ => head + v1 + tHmz v1 + v2 } ;
head + v1@(#vow|"ْ"|"ا"|"ي"|"و") -- the same but it ends without vowel
head + v1@#vstar -- the same but it ends without vowel
+ #hamza => head + v1 + tHmz v1 ;
head + #hamza + tail => head + (bHmz (dp 2 head) (take 2 tail)) + tail; --last head , take 1 tail
@@ -57,21 +65,22 @@ oper
};
--hamza in middle of word (body)
-- relaxing the pattern matching, so that we can call it from ResAra.sing /IL
bHmz : Str -> Str -> Str = \d1,d2 ->
case <d1,d2> of {
<"ِ",_> | <_,"ِ"> => "ئ";
<"ُ",_> | <_,"ُ"> => "ؤ";
<"َ",_> | <_,"َ"> => "أ";
_ => "ء"
<_+#istar,_> | <_,#istar> => "ئ";
<_+#ustar,_> | <_,#ustar> => "ؤ";
<_+"َ" ,_> | <_,"َ"> => "أ"; -- #astar would allow double alif
_ => "ء"
};
--hamza carrier sequence
tHmz : Str -> Str = \d ->
case d of {
"ِ" => "ئ";
"ُ" => "ؤ";
"َ" => "أ";
"ْ"|"ا"|"و"|"ي" => "ء"
"ُ" => "ؤ";
"َ" => "أ";
_ => "ء" -- long vowels and sukun
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -35,20 +35,30 @@ flags coding=utf8 ;
fuci = { h = "" ; m1 = "ُ" ; m2 = ""; t = "ِ" } ;
fucu = { h = "" ; m1 = "ُ" ; m2 = ""; t = "ُ" } ;
fUc = { h = "" ; m1 = "ُو"; m2 = ""; t = "" } ;
ufAc = { h = "ُ" ; m1 = "َا"; m2 = ""; t = "" } ;
ufca = { h = "ُ" ; m1 = "ْ" ; m2 = ""; t = "َ" } ;
eafAc = fAc ** { h = "أَ" } ;
eafac = fac ** { h = "أَ" } ;
eafIc = fIc ** { h = "أَ" } ;
eafic = fic ** { h = "أَ" } ;
eafAcil = { h = "أَ"; m1 = "َا" ; m2 = "ِ" ; t = "" } ;
eafAcIl = { h = "أَ"; m1 = "َا" ; m2 = "ِي" ; t = "" } ;
eafcilp = { h = "أَ"; m1 = "ْ" ; m2 = "ِ" ; t = "َة" } ;
eafcal = { h = "أَ"; m1 = "ْ" ; m2 = "َ" ; t = "" } ;
eafcAl = { h = "أَ"; m1 = "ْ" ; m2 = "َا" ; t = "" } ;
eifcAl = { h = "إِ"; m1 = "ْ" ; m2 = "َا" ; t = "" } ;
eIfcAl = eifcAl ** {h = "إِي"} ;
eafcil = { h = "أَ"; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
eafcul = { h = "أَ"; m1 = "ْ" ; m2 = "ُ" ; t = "" } ;
eiftacal = { h = "إِ"; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ;
eufcil = { h = "أُ"; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
euftucil = { h = "أُ"; m1 = "ْتُ" ; m2 = "ِ" ; t = "" } ;
euttucil = euftucil ** { h = "اُتُّ" ; m1 = "ِ" } ; ---- IL assimilated VIII
eufic = fic ** { h = "أُ" } ;
eufIc = fIc ** { h = "أُ" } ;
ufic = fic ** { h = "ُ" } ;
ufIc = fIc ** { h = "ُ" } ;
ufac = fac ** { h = "ُ" } ;
ufAc = fAc ** { h = "ُ" } ;
afcul = { h = "َ" ; m1 = "ْ" ; m2 = "ُ" ; t = "" } ;
faccalo = { h = "" ; m1 = "َ" ; m2 = "َّ" ; t = "ْ" } ;
facal = { h = "" ; m1 = "َ" ; m2 = "َ" ; t = "" } ;
@@ -74,15 +84,23 @@ flags coding=utf8 ;
fcil = { h = "" ; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
fcul = { h = "" ; m1 = "ْ" ; m2 = "ُ" ; t = "" } ;
ficl = { h = "" ; m1 = "ِ" ; m2 = "ْ" ; t = "" } ;
fcIl = fcil ** {m2 = "ِي"} ;
fcAl = fcal ** {m2 = "َا"} ;
ficAl = { h = "" ; m1 = "ِ" ; m2 = "َا" ; t = "" } ;
ficlp = { h = "" ; m1 = "ِ" ; m2 = "ْ" ; t = "َة" } ;
ftacc = facc ** {m1 = "ْتَ"} ;
ftucc = facc ** {m1 = "ْتُ"} ;
ftacal = { h = "" ; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ;
fticAl = ficAl ** { m1 = "ْتِ" } ; -- IL hollow VIII
ftical = ftacal ** { m1 = "ْتِ" } ; -- IL hollow VIII
ftAcal = ftacal ** { m1 = "ْتَا" } ; -- IL hollow VIII
ftIcal = ftacal ** { m1 = "ْتِي" } ; -- IL hollow VIII
ftacil = { h = "" ; m1 = "ْتَ" ; m2 = "ِ" ; t = "" } ;
ftucil = fucil ** { m1 = "ْتُ" } ;
euttucil = { h = "اُتُّ" ; m1 = "ِ" ; m2 = "" ; t = "" } ; ---- IL assimilated VIII
ttacal = ftacal ** { m1 = "" ; h = "تَّ" } ; ---- IL assimilated VIII
ttacil = ftacil ** { m1 = "" ; h = "تَّ" } ; ---- IL assimilated VIII
tticAl = ficAl ** { h = "تِّ" } ; ---- IL assimilated VIII
fuccAl = { h = "" ; m1 = "ُ" ; m2 = "َّا" ; t = "" } ;
fuccil = { h = "" ; m1 = "ُ" ; m2 = "ِّ" ; t = "" } ;
fuccilo = { h = "" ; m1 = "ُ" ; m2 = "ِّ" ; t = "ْ" } ;
@@ -100,7 +118,9 @@ flags coding=utf8 ;
mafcUl = { h = "مَ"; m1 = "ْ" ; m2 = "ُو" ; t = "" } ;
mafcil = { h = "مَ"; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
tafAcal = { h = "تَ"; m1 = "َا" ; m2 = "َ" ; t = "" } ;
tafAcul = { h = "تَ"; m1 = "َا" ; m2 = "ُ" ; t = "" } ;
tafaccal = { h = "تَ"; m1 = "َ" ; m2 = "َّ" ; t = "" } ;
tafaccul = { h = "تَ"; m1 = "َ" ; m2 = "ُّ" ; t = "" } ;
tufuccil = { h = "تُ"; m1 = "ُ" ; m2 = "ِّ" ; t = "" } ;
tufUcil = { h = "تُ"; m1 = "ُو" ; m2 = "ِ" ; t = "" } ;
ufAcal = { h = "ُ" ; m1 = "َا" ; m2 = "َ" ; t = "" } ;

View File

@@ -12,13 +12,13 @@ concrete PhraseAra of Phrase = CatAra ** open
UttImpPl,UttImpPol = \pol,imp -> {s = \\g => imp.s ! pol.p ! g ! ResAra.Pl ++ pol.s} ;
UttInterj i = {s = \\g => i.s} ;
UttIP ip = {s = \\g => ip.s ! False ! g ! Def ! Nom} ; --IL
UttIP ip = {s = \\g => ip.s ! False ! g ! Const ! Nom} ; --IL
UttAP ap = {s = ResAra.uttAP ap} ; --IL
UttCard c = {s = ResAra.uttNum c} ; --IL
UttCN cn = {s = ResAra.uttCN cn } ; --IL
UttNP np = {s = \\_ => np.s ! Nom} ;
UttVP vp = {s = uttVP vp} ; --IL
UttVP vp = {s = uttVP VPPerf vp} ; --IL
UttS s = {s = \\_ => s.s ! Verbal} ;
UttAdv,
UttIAdv = \s -> {s = \\_ => s.s} ; ---- OK? AR

View File

@@ -2,85 +2,99 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
flags optimize=all_subs ; coding = utf8 ;
lin
lin
-- : Cl -> QCl ; -- does John walk
QuestCl cl = {
s = \\t,p =>
table {
QIndir => "إِذا" ++ cl.s ! t ! p ! toOrder QIndir ;
QDir => "هَلْ" ++ cl.s ! t ! p ! Verbal -- yes/no question
}
};
QuestCl cl = {
s = \\t,p =>
table {
QIndir => "إِذا" ++ cl.s ! t ! p ! toOrder QIndir ;
QDir => "هَلْ" ++ cl.s ! t ! p ! toOrder QDir
}
};
-- : IP -> VP -> QCl ; -- who walks
QuestVP qp vp =
let np = ip2np qp (case vp.vtype of {Copula=>True ; _=>False}) ;
cl = PredVP np vp ;
in { s = \\t,p,qf => cl.s ! t ! p ! toOrder qf } ;
-- ComplSlashIP vps ip = {} ;
--IL guessed
QuestVP qp vp =
let np = ip2np qp vp.isPred ;
cl = PredVP np vp ;
in { s = \\t,p,qf => cl.s ! t ! p ! toOrder qf } ;
---- AR guessed
QuestIAdv iadv cl = {s = \\t,p,qf => iadv.s ++ cl.s ! t ! p ! toOrder qf} ;
-- QuestIAdv : IAdv -> Cl -> QCl ; -- why does John walk
QuestIAdv iadv cl = {s = \\t,p,qf => iadv.s ++ cl.s ! t ! p ! Verbal} ; -- Verbal word order, because there is no pre-existing question word /IL
---- IL guessed
-- : IComp -> NP -> QCl
QuestIComp ic np =
let vp = UseComp (CompNP np) ;
ip : ResAra.IP = np ** { -- NP's s is already present in VP, we only want its agr
s = \\_,_,_,_ => ic.s ! pgn2gn np.a.pgn } ;
in QuestVP ip vp ;
-- : IComp -> NP -> QCl
QuestIComp ic np =
let vp = UseComp (CompNP np) ; -- puts NP in nominative
ip : ResAra.IP = np ** { -- NP's s is already present in VP, we only want its agr
s = \\_,_,_,_ => ic.s ! pgn2gn np.a.pgn } ;
in QuestVP ip vp ;
-- : IP -> IComp ;
CompIP ip = ip ** {
s = \\gn => ip.s ! True -- True=IP will be a subject of predicative sentence
! gn.g -- IComp agrees in gender with eventual head
! Def ! Nom ; -- IP will be a subject
-- : IP -> IComp ;
CompIP ip = ip ** {
s = \\gn => ip.s ! True -- True=IP will be a subject of predicative sentence
! gn.g -- IComp agrees in gender with eventual head
! Def ! Nom ; -- IP will be a subject
} ;
CompIAdv iadv = { s = \\_ => iadv.s ; a = ResAra.Sg } ;
-- : IAdv -> IComp ; -- where (is it)
CompIAdv iadv = { s = \\_ => iadv.s ; a = ResAra.Sg } ;
-- QCl = {s : Tense => Polarity => QForm => Str} ;
QuestSlash ip cls = { ----IL just guessing
s = \\t,p,qf =>
let cl : ResAra.Cl = complClSlash cls ; -- dummy conversion to Cl
-- : IP -> ClSlash -> QCl ; -- whom does John love
QuestSlash ip cls = {
s = \\t,p,qf => -- remove cls's c2 so it won't show up in the wrong place
let cl : ResAra.Cl = complClSlash (cls ** {c2=noPrep});
o = toOrder qf
in cls.c2.s ++ ip.s ! False ! Masc ! Def ! Nom ++ cl.s ! t ! p ! o
in cls.c2.s ++ bindIf cls.c2.binds -- Put cls's c2 ("with") before the IP ("whom")
++ ip.s ! False ! Masc ! Def ! Nom
++ cl.s ! t ! p ! o
} ;
--IL guessed
PrepIP p ip = {
s = p.s ++ ip.s ! False -- not used as a subject of predicative sentence
! Masc ----
! Def ! Gen
-- : Prep -> IP -> IAdv ; -- with whom
PrepIP prep ip = {
s = prep.s ++ bindIf prep.binds
++ ip.s ! False -- not used as a subject of predicative sentence
! Masc ----
! Def -- not sure /IL
! prep.c
} ;
-- : IP -> Adv -> IP ; -- who in Paris
AdvIP ip adv = ip ** {
s = \\isPred,g,s,c => ip.s ! isPred ! g ! s ! c ++ adv.s ;
} ;
-- : IDet -> IP
IdetIP idet = idet ** {
s = \\isPred => idet.s ;
a = { pgn = agrP3 NoHum Masc idet.n ; isPron = False }
} ;
-- : IAdv -> Adv -> IAdv ; -- where in Paris
AdvIAdv iadv adv = {s = iadv.s ++ adv.s} ;
-- : IDet -> CN -> IP
IdetCN idet cn = {
s = \\isPred,g,s,c
-- : IDet -> IP
IdetIP idet = idet ** {
s = \\isPred => idet.s ;
a = { pgn = agrP3 NoHum Masc idet.n ; isPron = False }
} ;
-- : IDet -> CN -> IP
IdetCN idet cn = {
s = \\isPred,g,s,c
=> idet.s ! cn.g ! s ! c ++
cn2str cn idet.n idet.d Gen ;
a = { pgn = agrP3 NoHum cn.g idet.n ; isPron = False }
} ;
a = { pgn = agrP3 NoHum cn.g idet.n ; isPron = False }
} ;
-- : IQuant -> Num -> IDet
IdetQuant iquant num = {
s = \\g,s,c =>
IdetQuant iquant num = {
s = \\g,s,c =>
let gend = detGender g num.n -- gender flips with some numbers
in iquant.s ! s ! c ++ num.s ! gend ! s ! c ;
n = sizeToNumber num.n ;
d = Indef ---- TODO check
} ;
n = sizeToNumber num.n ;
d = Indef ---- TODO check
} ;
-- IL guessed all following
lincat
QVP = ResAra.VP ; -- buy what where
lin
ComplSlashIP vps ip = ComplSlash vps (ip2np ip False) ; -- : VPSlash -> IP -> QVP ; -- buys what
AdvQVP = AdvVP ; -- : VP -> IAdv -> QVP ; -- lives where
AddAdvQVP = AdvVP ; -- : QVP -> IAdv -> QVP ; -- buys what where
QuestQVP = QuestVP ; -- : IP -> QVP -> QCl ; -- who buys what where
}

33
src/arabic/README.md Normal file
View File

@@ -0,0 +1,33 @@
# Arabic
## Language info
* English name: Arabic
* Autonym: العربية
* ISO code: Ara
## Authors
* Ali El Dada, 2006-2009
* Aarne Ranta, 200?-
* Inari Listenmaa, 2018-
## Publications
* A. El Dada and A. Ranta. **Implementing an Open Source Arabic Resource Grammar in GF.**
In M. Mughazy (ed), *Perspectives on Arabic Linguistics XX. Papers from the Twentieth Annual Symposium on Arabic Linguistics, Kalamazoo, March 26*. John Benjamins Publishing Company. 2007.
* An outline of the Arabic resource grammar project, focusing on linguistic aspects.
* A. El Dada. **Implementation of the Arabic Numerals and their Syntax in GF.**
*Computational Approaches to Semitic Languages: Common Issues and Resources*,
ACL-2007 Workshop, June 28, 2007, Prague.
* A case study with the resource grammar, focusing on the morphosyntax and agreement of constructions with numerals.
## Implementation information
The grammar is for vocalised Arabic.
## Maintainer
Inari Listenmaa ([@inariksit](https://github.com/inariksit))

View File

@@ -1,5 +1,5 @@
concrete RelativeAra of Relative = CatAra **
open ResAra in {
concrete RelativeAra of Relative = CatAra **
open Prelude,ResAra in {
flags coding=utf8;
lin
@@ -10,20 +10,20 @@ concrete RelativeAra of Relative = CatAra **
-- : RP -> VP -> RCl ; -- who loves John
RelVP rp vp = {
s = \\t,p,agr,c =>
let
s = \\t,p,agr,c =>
let
npS : Case => Str = \\_ => rp.s ! agr2ragr agr c ;
np : NP = agrNP agr ** {s = npS} ;
np : ResAra.NP = agrNP {pgn=agr;isPron=False} ** {s = npS} ;
cl = predVP np vp ;
in
cl.s ! t ! p ! Nominal
} ;
-- : RP -> ClSlash -> RCl ; -- whom John loves
-- : RP -> ClSlash -> RCl ; -- whom John loves
RelSlash rp cls = cls ** {
s = \\t,p,agr,c =>
s = \\t,p,agr,c =>
let --empty : Agr -> NP = emptyNP ;
obj : ResAra.NP = pgn2pron agr.pgn ; -- head is repeated as a clitic object pronoun
obj : ResAra.NP = pgn2pron agr ; -- head is repeated as a clitic object pronoun
cl : ResAra.Cl = complClSlash obj cls ;
in rp.s ! agr2ragr agr c ++ cl.s ! t ! p ! VOS
} ;
@@ -45,6 +45,6 @@ concrete RelativeAra of Relative = CatAra **
RDl Fem Bare => "اَللَّتَيْن" ;
RDl Fem Nom => "اَللَّتَانِ" ;
RDl Fem _ => "اَللَّتَيْنِ"
}
}
} ;
}

File diff suppressed because it is too large Load Diff

View File

@@ -12,30 +12,15 @@ concrete SentenceAra of Sentence = CatAra ** open
flags optimize=all_subs ; coding=utf8 ;
lin
{-
PredVP np vp =
{ s = \\t,p,o =>
case o of {
Verbal =>
case vp.comp.a.isPron of {
False => vp.s ! t ! p ! Verbal ! np.a ++ np.s ! Nom ++ vp.comp.s ! Acc ;
True => vp.s ! t ! p ! Verbal ! np.a ++ vp.comp.s ! Acc ++ np.s ! Nom
};
Nominal =>
np.s ! Nom ++ vp.s ! t ! p ! Nominal ! np.a ++ vp.comp.s ! Acc
}
};
-}
PredVP = predVP ;
-- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
PredVP = predVP ;
ImpVP vp = {
s = \\p,g,n =>
case p of {
Pos => vp.s ! (Per2 g n) ! VPImp ++ vp.obj.s ++ vp.s2 ;
Neg => "لا" ++ vp.s ! (Per2 g n) ! (VPImpf Jus) ++ vp.obj.s ++ vp.s2
}
Pos => vp.s ! Per2 g n ! VPImp ;
Neg => "لَا" ++ vp.s ! Per2 g n ! VPImpf Jus
} ++ vp.obj.s ++ vp.pred.s ! {g=g;n=n} ! Acc ++ vp.s2
};
--
@@ -52,18 +37,14 @@ concrete SentenceAra of Sentence = CatAra ** open
SlashVP = predVPSlash ;
AdvSlash slash adv = slash ** { s2 = slash.s2 ++ adv.s } ;
-- SlashPrep : Cl -> Prep -> ClSlash
-- Will be awkward to implement in the way ClSlash is now.
-- ClSlash is implemented the way it is now for a good reason:
-- we need to support different word orders.
-- : Cl -> Prep -> ClSlash
-- SlashPrep cl prep = TODO
-- SlashVS np vs sslash = TODO
-- EmbedS s = {s = conjThat ++ s.s} ;
-- EmbedQS qs = {s = qs.s ! QIndir} ;
-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
--
EmbedS s = {s = "مَا" ++ s.s ! Verbal} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
EmbedVP vp = {s = uttVP VPPerf vp ! Masc} ; -- TODO: use VPGer once it's more stable
UseCl t p cl =
{s = \\o => t.s ++ p.s ++
@@ -85,5 +66,9 @@ concrete SentenceAra of Sentence = CatAra ** open
UseRCl t p cl = {s = \\agr,c => t.s ++ p.s ++ cl.s ! t.t ! p.p ! agr ! c} ;
UseSlash t p cl = UseCl t p (complClSlash cl) ;
-- If the cls has a c2, the preposition will just hang there without an object.
-- If this bothers you, call complClSlash to cls ** {c2=noPrep}. /IL
UseSlash t p cls = UseCl t p (complClSlash cls) ;
AdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ;
}

View File

@@ -1,5 +1,5 @@
concrete StructuralAra of Structural = CatAra **
open MorphoAra, ResAra, ParadigmsAra, Prelude in {
open MorphoAra, ResAra, ParadigmsAra, (N=NounAra), Prelude in {
flags optimize=all ; coding=utf8 ;
@@ -11,15 +11,15 @@ concrete StructuralAra of Structural = CatAra **
almost_AdN = ss "حَوَالي" ; -- or "تَقرِيبا"
-- although_Subj = ss "َلتهُْغه" ;
-- always_AdV = ss "َلوَيس" ;
and_Conj = ss "وَ" ** {n = Pl} ;
and_Conj = mkConj "وَ" Pl ;
-- because_Subj = ss "بعَُسي" ;
before_Prep = mkPrep "قَبْلَ" ;
behind_Prep = mkPrep "خَلْفَ" ;
between_Prep = mkPrep "بَيْنَ" ;
-- both7and_DConj = sd2 "بْته" "َند" ** {n = Pl} ;
both7and_DConj = mkConj "كِلا" "وَ" Pl ;
-- but_PConj = ss "بُت" ;
by8agent_Prep = mkPrep "بِ" ;
by8means_Prep = mkPrep "بِ" ;
by8agent_Prep,
by8means_Prep = biPrep ;
can_VV = mkVV (mkV "طوع" FormX) ;
-- can8know_VV = {
-- s = table VVForm [["بي َبلي تْ"] ; "عَن" ; "عُْلد" ;
@@ -28,28 +28,30 @@ concrete StructuralAra of Structural = CatAra **
-- } ;
during_Prep = mkPrep "خِلَالَ" ;
-- either7or_DConj = sd2 "ِتهر" "ْر" ** {n = Sg} ;
everybody_NP = regNP "الجَمِيع" Pl ;
everybody_NP = regNP "الجَمِيع" Pl Def ;
every_Det = mkDet "كُلّ" Sg Const ;
everything_NP = regNP "كُلّ" Sg ;
everything_NP = regNP "كُلّ" Sg Def ;
-- everywhere_Adv = ss "ثريوهري" ;
few_Det = mkDet "بَعض" Pl Const ;
-- first_Ord = ss "فِرست" ;
for_Prep = liPrep ;
from_Prep = mkPrep "مِنَ" ;
he_Pron = ResAra.he_Pron ;
here_Adv = ss "هُنا" ;
-- here7to_Adv = ss ["تْ هري"] ;
-- here7from_Adv = ss ["فرْم هري"] ;
here7to_Adv = ss "إلَىَ هُنَا" ;
here7from_Adv = ss "مِنْ هُنَا" ;
how_IAdv = ss "كَيفَ" ;
how8many_IDet = {
s = \\g,s,c => "كَمْ عَدَد" + caseTbl ! c ;
n = Pl ; d = Def
n = Pl ; d = Def
} ; -- IL
-- if_Subj = ss "ِف" ;
how8much_IAdv = ss "كَمْ" ;
if_Subj = mkSubj "إِذَا" Verbal ;
--whether_Subj = mkSubj "مَا إِذَا" Verbal ;
in8front_Prep = mkPrep "مُقَابِلَ" ;
i_Pron = ResAra.i_Pron ;
in_Prep = mkPrep "فِي" ;
it_Pron = emptyNP ** {s = \\_ => "هَذَا"} ; -- was: it_Pron = mkPron "ِت" "ِت" "ِتس" (Per3 Masc Sg);
it_Pron = N.DetNP (N.DetQuant this_Quant N.NumSg) ; -- was: it_Pron = mkPron "ِت" "ِت" "ِتس" (Per3 Masc Sg);
-- less_CAdv = ss "لسّ" ;
many_Det = mkDet "جَمِيع" Pl Const ;
-- more_CAdv = ss "مْري" ;
@@ -60,46 +62,46 @@ concrete StructuralAra of Structural = CatAra **
-- ["هَد تْ"] ; ["هَثِنغ تْ"] ; "مُستنءت" ; ["هَدنءت تْ"]] ; ----
-- isAux = True
-- } ;
nothing_NP = regNP "لَا شَيْء" Sg Def ;
no_Utt = {s = \\_ => "لا"} ;
on_Prep = mkPrep "عَلى" ;
--- DEPREC one_Quant = mkQuantNum "واحِد" Sg Indef ;
on_Prep = mkPrep "عَلَى" ;
only_Predet = mkPredet "فَقَط" False;
-- or_Conj = ss "ْر" ** {n = Sg} ;
or_Conj = mkConj "أَوْ" ;
-- otherwise_PConj = ss "ْتهروِسي" ;
part_Prep = mkPrep "مِنَ" ;
-- please_Voc = ss "ةلَسي" ;
possess_Prep = mkPrep "ل" ;
possess_Prep = liPrep ;
-- quite_Adv = ss "قُِتي" ;
she_Pron = ResAra.she_Pron ;
-- so_AdA = ss "سْ" ;
somebody_NP = regNP "أَحَد" Sg ;
someSg_Det = mkDet "أَحَد" Sg Const ;
somePl_Det = mkDet "بَعض" Pl Const ;
something_NP = regNP "شَيْء" Sg ;
so_AdA = very_AdA ;
somebody_NP = regNP "أَحَد" Sg Indef ;
someSg_Det = ResAra.someSg_Det ;
somePl_Det = ResAra.somePl_Det ;
something_NP = regNP "شَيْء" Sg Indef ;
-- somewhere_Adv = ss "سْموهري" ;
that_Quant = mkQuant3 "ذَلِكَ" "تِلكَ" "أُلٱِكَ" Def;
that_Subj = ss "أنَّ" ;
that_Subj = mkSubjَنَّ" ;
----b that_NP = indeclNP "ذَلِكَ" Sg ;
there_Adv = ss "هُناك" ;
-- there7to_Adv = ss "تهري" ;
-- there7from_Adv = ss ["فرْم تهري"] ;
-- therefore_PConj = ss "تهرفْري" ;
----b these_NP = indeclNP "هَؤُلَاء" Pl ;
they_Pron = theyMasc_Pron ;
this_Quant = mkQuant7 "هَذا" "هَذِهِ" "هَذَان" "هَذَيْن" "هَاتَان" "هَاتَيْن" "هَؤُلَاء" Def;
they_Pron = theyMasc_Pron ;
this_Quant = mkQuant7 "هَذَا" "هَذِهِ" "هَذَان" "هَذَيْن" "هَاتَان" "هَاتَيْن" "هَؤُلَاء" Def ;
----b this_NP = indeclNP "هَذا" Sg ;
----b those_NP = indeclNP "هَؤُلَاءكَ" Pl ;
through_Prep = mkPrep "عَبْرَ" ;
-- too_AdA = ss "تّْ" ;
to_Prep = mkPrep "إِلى" ;
too_AdA = very_AdA ;
to_Prep = mkPrep "إِلَى" ;
under_Prep = mkPrep "تَحْتَ" ;
-- very_AdA = ss "ثري" ;
very_AdA = ss "جِدَّاً" ;
want_VV = mkVV (mkV "رود" FormIV) ;
we_Pron = ResAra.we_Pron ;
whatPl_IP = mkIP "ما" "ماذا" Pl ;
whatSg_IP = mkIP "ما" "ماذا" Sg ;
when_IAdv = ss "مَتَى" ;
-- when_Subj = ss "وهن" ;
when_Subj = mkSubj "عِنْدَمَا" Verbal ;
where_IAdv = ss "أَينَ" ;
which_IQuant = {
s = \\s,c => case <c,s> of {
@@ -114,15 +116,16 @@ concrete StructuralAra of Structural = CatAra **
} ;
whoSg_IP = mkIP "مَنْ" "مَنْ" Sg ;
whoPl_IP = mkIP "مَنْ" "مَنْ" Pl ;
-- why_IAdv = ss "وهي" ;
why_IAdv = ss "لِمَاذَا" ;
without_Prep = mkPrep "بِدُونِ" ;
with_Prep = mkPrep "مَع" ;
with_Prep = mkPrep "مَعَ" ;
yes_Utt = {s = \\_ => "نَعَم"} ;
youSg_Pron = youSgMasc_Pron ;
youPl_Pron = youPlMasc_Pron ;
youPol_Pron = youSgFem_Pron ; -- arbitrary?
youPol_Pron = youPlFem_Pron ; -- arbitrary?
have_V2 = dirV2 (regV "يَملِك") ;
have_V2 = mkV2 ladaa_V (casePrep nom) ; -- "X has Y" literally "Y<nom> is on X<nom>"
--have_V2 = dirV2 (regV "يَملِك") ; -- "X<nom> owns/possesses Y<acc>"
lin language_title_Utt = {s = \\_ => "العربية"} ;

View File

@@ -14,15 +14,13 @@ lin
-- } ;
--IL TODO: check out some opers regarding state in ResAra. These are just dummy values.
CNSymbNP det cn xs =
let g = cn.g ; n = sizeToNumber det.n in {
let g = cn.g ; n = sizeToNumber det.n in emptyNP ** {
s = \\c => det.s ! NoHum ! g ! c ++ cn2str cn n Def c ++ xs.s; ----IL word order?? Seems to be nontrivial according to ResAra comments.
a = dummyAgrP3 n ;
empty = []
a = dummyAgrP3 n
} ;
CNNumNP cn i = {
CNNumNP cn i = emptyNP ** {
s = \\c => cn2str cn Sg Def c ++ uttNum i ! cn.g ;
a = dummyAgrP3 Sg ;
empty = []
a = dummyAgrP3 Sg
} ;
SymbS sy = {s = \\_ => sy.s} ;

View File

@@ -5,14 +5,60 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
lin
UseV = predV ;
SlashVV vv vps = vps ** predV vv ; ----IL
-- : VV -> VPSlash -> VPSlash
SlashVV vv vps = vps ** ComplVV vv vps ;
-- TODO: --c3 is for verb, c2 is for dir.obj
--SlashV2V : V2V -> VP -> VPSlash ; -- beg (her) to go
--SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
SlashV2V v2v vp = let v2vVP = predV v2v in -- IL
vp ** {
s = v2vVP.s ;
agrObj = \\pgn => v2v.s2 -- أَنْ
++ vp.s ! pgn ! VPImpf Cnj -- this will agree with the object added by ComplSlash
++ vp.obj.s ;
obj = emptyObj ;
vtype = NotPred ;
c2 = v2v.c2 ; -- preposition for the direct object
sc = v2v.sc
} ;
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
SlashV2VNP v2v np vps = let v2vVP = slashV2 v2v in -- IL
vps ** {
s = \\pgn,vpf => v2vVP.s ! pgn ! vpf -- main verb agrees with subject
++ bindIfPron np v2vVP
++ v2v.s2 -- أَنْ
++ vps.s ! np.a.pgn ! VPImpf Cnj -- verb from old VP agrees with object
++ vps.obj.s ; -- otherwise obj appears in a weird place /IL
obj = emptyObj ;
vtype = NotPred ;
-- preposition for the direct object comes from VP
sc = v2v.sc
} ;
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
SlashV2S v2s s = slashV2 v2s ** { -- IL
agrObj = -- this is put into agrObj even though it doesn't depend on agr, because insertObj puts agrObj *after* the new object.
\\pgn => v2s.s2 -- أَنَّ
++ s.s ! v2s.o ;
} ;
SlashV2a = slashV2 ;
Slash3V3 v np = insertObj np (slashV2 v) ** {c2 = v.c3};
Slash2V3 v np = insertObj np (slashV2 v) ** {c2 = v.c3 ; agrObj = \\_ => []};
Slash3V3 v np =
let vp = slashV2 v ** {c2 =
v.c2 ** {
s = case np.a.isPron of {
True => case v.c2.binds of {
True => v.c2.s ; -- to make sure there's something for the object to attach to
False => v.c2.s ++ "إِيَّا" } ; -- see https://en.wiktionary.org/wiki/%D8%A5%D9%8A%D8%A7#Particle /IL
False => v.c2.s }
}
}
in vp ** {
c2 = v.c3 ;
agrObj = \\_ => bindIfPron np vp -- will be emptied when insertObj is called /IL
} ;
ComplSlash vp np = insertObj np vp ;
@@ -20,15 +66,16 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
ComplVV vv vp = let vvVP = predV vv in -- IL
vp ** {
s = \\pgn,vpf => vvVP.s ! pgn ! vpf
++ vv.c2.s -- أَنْ
++ vv.s2 -- أَنْ
++ vp.s ! pgn ! VPImpf Cnj ;
isPred = False ;
vtype = NotPred ;
sc = vv.sc
} ;
-- : VS -> S -> VP ; -- say that she runs
ComplVS vs s = predV vs ** { -- IL
obj = emptyObj ** {s = s.s ! Subord}
obj = emptyObj ** {s = vs.s2 -- أَنَّ
++ s.s ! vs.o}
} ;
-- : VQ -> QS -> VP ; -- wonder who runs
@@ -37,7 +84,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
} ;
-- : VA -> AP -> VP ; -- they become red
ComplVA v ap = predV v ** {comp = CompAP ap} ;
ComplVA v ap = predV v ** {pred = CompAP ap} ;
-- ComplV2A v np ap =
-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ;
@@ -45,21 +92,33 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
UseComp xabar =
case xabar.isNP of {
False => kaan xabar ;
True => predV copula ** {obj = xabar.obj ; isPred=True}
True => predV copula ** {obj = xabar.obj ; vtype=Copula}
} ;
UseCopula = predV copula ;
-- : VP -> Prep -> VPSlash ; -- live in (it)
VPSlashPrep vp prep = vp ** {
c2 = prep ;
agrObj = \\_ => [] -- to make it into VPSlash, VP didn't have that field before
} ;
AdvVP vp adv = insertStr adv.s vp ;
AdVVP adv = insertStr adv.s ;
AdVVPSlash adv vps = vps ** insertStr adv.s vps ;
--
-- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ;
--
-- : VPSlash -> VP ; -- love himself
ReflVP vps = vps ** {
s = \\pgn,vf => vps.s ! pgn ! vf
++ vps.obj.s -- only relevant if the VPSlash has been through VPSlashPrep
++ vps.c2.s ++ bindIf vps.c2.binds
++ reflPron vps.c2.c pgn ;
c2 = accPrep ;
obj = emptyObj ; -- because old obj was moved in s
} ;
PassV2 = passPredV ;
--
-- UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no
CompAP ap = {s = \\agr,c => ap.s ! Hum ! agr.g ! agr.n ! Indef ! c ; --FIXME
obj = emptyObj ; isNP = False} ;
@@ -68,7 +127,9 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
CompCN cn = {s = \\agr,c => cn2str cn agr.n Indef Nom ;
obj = emptyObj ; isNP = False} ;
CompNP np = {s = \\_,_ => [] ; obj = np ** {s = np.s ! Nom} ; isNP = True} ;
CompNP np = {s = \\_,_ => [] ;
obj = {s = np.s ! Nom ; a = agrLite np.a} ;
isNP = True} ;
--
--
}

View File

@@ -21,7 +21,9 @@ incomplete concrete AdjectiveBantu of Adjective =
} ;
ComplA2 a np = {
s = \\g,n => a.s !AComp g n ++ a.c2 ++ np.s ! NPAcc;
s = \\g,n => a.s !AComp g n ++ a.c2 ++ np.s ! NCase Nom;
isPre = False
} ;
ReflA2 a ={

View File

@@ -13,9 +13,10 @@ incomplete concrete AdverbBantu of Adverb =
} ;
PrepNP prep np = let agr = complAgr np.a
in {s = prep.s!agr.n!agr.g ++ (np.s ! NPAcc) } ; --s = preOrPost prep.isPre prep.s (np.s ! NPAcc)
AdAdv = cc2 ;
in {s = prep.s!agr.n!agr.g ++ (np.s ! NCase Loc ) } ;
AdAdv = cc2 ;
PositAdAAdj a = {s = a.s !AAdj G1 Sg } ;

View File

@@ -1,5 +1,5 @@
incomplete concrete CatBantu of Cat =
CommonX - [Pol]
incomplete concrete CatBantu of Cat =
CommonX
** open ResBantu, Prelude, ParamX in {
flags optimize=all_subs ;
@@ -7,8 +7,6 @@ incomplete concrete CatBantu of Cat =
lincat
Pol = {s : Str ; b : Bool} ;
S = {s : Str} ;
QS = {s : QForm => Str} ;
RS = {s : Agr => Str ; c : NPCase} ; -- c for it clefts
@@ -16,7 +14,7 @@ incomplete concrete CatBantu of Cat =
-- Sentence
-- Cl = {s : Tense => Anteriority => Bool => Str} ;
Cl = {s : Tense => Anteriority => Bool => Str} ;
-- ClSlash = {
-- s : ResKam.Tense => Anteriority => Bool => Str ;
-- } ;

View File

@@ -12,7 +12,9 @@ resource CommonBantu = ParamX ** open Prelude in {
param
Case = Nom | Loc ;
NPCase = NCase Case | NPAcc | NPNomPoss ;
NPCase = NCase Case | NPoss ;
CardOrd = NCard | NOrd ;
oper

View File

@@ -3,12 +3,12 @@
interface DiffBantu = open CommonBantu, Prelude in {
flags coding=utf8 ;
-- HL: everything depending on Gender is not common, so it must not
-- be in CommonBantu, but here in DiffBantu.
oper
Gender : PType ;
firstGender : Gender ; -- G1
secondGender : Gender ; -- G2
firstGender : Gender ;
secondGender : Gender ; -- G2
Noun : Type = {s : Number => Case => Str ; g : Gender};
CNoun : Type = {s : Number => Case => Str ; g : Gender; s2 : Number => Str};
@@ -38,7 +38,9 @@ oper
} ;
verbAgr : Agr -> {g : Gender ; n : Number ; p : Person} = \a -> case a of {
Ag g n p => {g = g ; n = n ; p = p}
} ; -- verbAgr = agrFeatures, why both? HL
} ; --
detAgr : Agr -> {g : Gender ; p : Person} = \a -> case a of {
Ag g _ p => {g = g; p = p}
@@ -70,7 +72,7 @@ param
PronForm= Pers | Poss Number Gender;
DetForm = Sub | Obj Gender ;
-- HL: the above is material removed from CommonBantu and adapted --
oper
conjThan : Str ; --one of them in bantu
@@ -84,8 +86,10 @@ param
DForm ;
AForm;
oper
ProunSgprefix : Gender -> Str ; -- added, HL
ProunPlprefix : Gender -> Str ; -- added, HL
ProunSgprefix : Gender -> Str ;
ProunPlprefix : Gender -> Str ;
Cardoneprefix : Gender -> Str;
Cardtwoprefix : Gender -> Str;
Allpredetprefix : Gender -> Str;

View File

@@ -23,8 +23,9 @@ lin
n=agr.n; g=agr.g
in {s = table {
NCase c => pron.s!Pers ;
NPAcc => pron.s!Pers ;
NPNomPoss => pron.s!Poss n g };
NPoss => pron.s!Poss n g };
a = Ag agr.g agr.n agr.p;
} ;
-- Predet -> NP -> NP
@@ -141,11 +142,13 @@ lin
-- PossNP : CN -> NP -> CN
-- e.g. 'house of Paris', 'house of mine'
PossNP cn np =let agr = detAgr np.a in
{s = \\n,c => cn.s ! n ! Nom ++ possess_Prep.s! n!cn.g ++ np.s ! NPNomPoss;
{s = \\n,c => cn.s ! n ! Nom ++ possess_Prep.s! n!cn.g ++ np.s ! NPoss;
s2 =\\n => []; g = cn.g} ;
-- PartNP : CN -> NP -> CN
-- e.g. 'glass of wine'
PartNP cn np = {s = \\n,c => cn.s ! n ! Nom ++ part_Prep.s! n!cn.g ++ np.s ! NPAcc ; s2 =\\n => []; g = cn.g} ;
PartNP cn np = {s = \\n,c => cn.s ! n ! Nom ++ part_Prep.s! n!cn.g ++ np.s ! NCase Nom ; s2 =\\n => []; g = cn.g} ;
-- CountNP : Det -> NP -> NP
-- e.g. 'three of them', 'some of the boys'
@@ -162,8 +165,10 @@ lin
DetDAP d = { s=d.s; n=d.n };
ApposCN cn np = let agr = complAgr np.a in
{s = \\n,c => np.s ! NCase Nom --++ possess_Prep.s!n!agr.g
++ cn.s !n ! Nom ; s2 =\\n => ""; g = cn.g} ;
-- ApposCN cn np = let agr = complAgr np.a in
-- {s = \\n,c => np.s ! NCase Nom --++ possess_Prep.s!n!agr.g
-- ++ cn.s !n ! Nom ; s2 =\\n => ""; g = cn.g} ;
}

View File

@@ -11,6 +11,7 @@ flags
oper
npNom : NPCase = NCase Nom ;
npLoc : NPCase = NCase Loc ;
NPAcc : NPCase = NCase Nom ; -- Added this so that swahili compiles. /IL2020
npcase2case : NPCase -> Case = \nc -> case nc of {NCase c => c ; _ => Nom} ;
@@ -18,8 +19,9 @@ oper
{s : NPCase => Str ; a : Agr} = \i,my,g,n,p ->
{ s = table {
NCase Nom => i ;
NPAcc => my ;
NCase Loc | NPNomPoss => my -- works for normal genitives, "whose", etc.
NCase Loc | NPoss => my -- works for normal genitives, "whose", etc.
} ;
a = Ag g n p ;
};
@@ -80,14 +82,3 @@ oper
finalComma : Str = pre {"," | "." => []; "" => SOFT_BIND ++ ","; _ => []} ;
frontComma : Str = SOFT_BIND ++ "," ;
}
-- insertObject:
-- p -cat=Cl -tr "la femme te l' envoie"
-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
-- (ComplV3 send_V3 (UsePron he_Pron) (UsePron thou_Pron))
-- la femme te l' a envoyé
--
-- p -cat=Cl -tr "la femme te lui envoie"
-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
-- (ComplV3 send_V3 (UsePron thou_Pron) (UsePron he_Pron))
-- la femme te lui a envoyée

View File

@@ -1,14 +1,10 @@
incomplete concrete SentenceBantu of Sentence =
CatBantu ** open Prelude, CommonBantu, ResBantu in {
{-
flags optimize=all_subs ;
coding=utf8 ;
lin
PredVP np vp = mkClause (np.s ! npNom) np.a vp ;
PredVP np vp = mkClause (np.s ! npNom) (agrFeatures np.a) vp ;
{-
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
ImpVP vp = {
@@ -43,11 +39,12 @@ incomplete concrete SentenceBantu of Sentence =
EmbedS s = {s = conjThat ++ s.s} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
EmbedVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr
UseCl t p cl = {
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.b } ;
-}
UseCl t p cl =
let b : Bool = case p.p of {Pos => True ; _ => False}
in {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! b} ;
-- UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! p.b} ;
UseQCl t p cl = {
{- UseQCl t p cl = {
s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q
} ;
UseRCl t p cl = {

View File

@@ -1,11 +1,9 @@
incomplete concrete VerbBantu of Verb =
CatBantu ** open Prelude, CommonBantu, ResBantu in {
{-
flags optimize=all_subs ;
lin
UseV = predV ;
{-
SlashV2a v = predV v ** {c2 = v.c2 ; gapInMiddle = False} ;
Slash2V3 v np =
insertObjc (\\_ => v.c2 ++ np.s ! NPAcc) (predV v ** {c2 = v.c3 ; gapInMiddle = False}) ;

37
src/basque/README.md Normal file
View File

@@ -0,0 +1,37 @@
# Basque
## Language info
* English name: Basque
* Autonym: Euskara
* ISO code: Eus
## Authors
* Inari Listenmaa, 2015-
* Francis Tyers, 2015-2016
Thanks to Olatz Perez-De-Viñaspre for providing native help.
## Publications
-
## Implementation information
### Sources
The implementation follows [Standard Basque: a progressive grammar](https://mitpress.mit.edu/books/standard-basque) by Rudolf P.G. de Rijk.
[LexiconEus](LexiconEus.gf) and [Dictionary](https://github.com/GrammaticalFramework/wide-coverage/blob/master/translator/DictionaryEus.gf) have been derived from lexica
in the [Apertium](https://github.com/apertium/apertium-eus) project.
### Testing
Verb morphology has been tested very rudimentarily against Apertium morphological
lexicon, by method described [here](tests#readme). There are known errors in verb forms,
especially for transitive and ditransitive verbs. Some moods and tenses have not been
implemented yet.
## Maintainer
Inari Listenmaa (@inariksit)

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
lin
PositA a = {
@@ -9,11 +9,11 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
} ;
ComparA a np = {
s = \\aform,_ => "ïî" ++ hyphen ++ a.s ! aform ++ "îò" ++ np.s ! RObj CPrep ;
s = \\aform,_ => "по" ++ hyphen ++ a.s ! aform ++ "от" ++ np.s ! RObj CPrep ;
isPre = True
} ;
UseComparA a = {
s = \\aform,_ => "ïî" ++ hyphen ++ a.s ! aform ;
s = \\aform,_ => "по" ++ hyphen ++ a.s ! aform ;
isPre = True
} ;
@@ -35,12 +35,12 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
} ;
ReflA2 a = {
s = \\aform,_ => a.s ! aform ++ linPrep a.c2 ++ ["ñåáå ñè"] ;
s = \\aform,_ => a.s ! aform ++ linPrep a.c2 ++ ["себе си"] ;
isPre = False
} ;
SentAP ap sc = {
s = \\a,p => ap.s ! a ! p ++ sc.s ! {gn=aform2gennum a; p=p} ;
s = \\a,p => ap.s ! a ! p ++ sc.s ;
isPre = False
} ;

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
lin
PositAdvAdj a = {s = a.adv} ;
@@ -8,7 +8,7 @@ concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
s = cadv.s ++ a.s ! ASg Neut Indef ++ cadv.p ++ np.s ! RObj CPrep
} ;
ComparAdvAdjS cadv a s = {
s = cadv.s ++ a.s ! ASg Neut Indef ++ cadv.p ++ "êîëêîòî" ++ s.s
s = cadv.s ++ a.s ! ASg Neut Indef ++ cadv.p ++ "колкото" ++ s.s
} ;
PrepNP prep np = {s = prep.s ++ np.s ! RObj prep.c} ;

View File

@@ -1,5 +1,5 @@
--# -coding=utf8
concrete CatBul of Cat = CommonX - [IAdv,AdV,SC] ** open ResBul, Prelude, Predef, (R = ParamX) in {
concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, (R = ParamX) in {
lincat
-- Tensed/Untensed
@@ -46,7 +46,6 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV,SC] ** open ResBul, Prelude, Predef
IAdv = {s : QForm => Str} ;
AdV = {s : Str; p : Polarity} ;
SC = {s : Agr => Str} ;
-- Noun
@@ -84,9 +83,9 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV,SC] ** open ResBul, Prelude, Predef
A = {s : AForm => Str; adv : Str; isPre : Bool} ;
A2 = {s : AForm => Str; adv : Str; c2 : Preposition} ;
N = {s : NForm => Str; rel : AForm => Str; relPost : Bool; g : AGender} ;
N2 = {s : NForm => Str; rel : AForm => Str; relPost : Bool; g : AGender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str; rel : AForm => Str; relPost : Bool; g : AGender} ** {c2,c3 : Preposition} ;
N = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ;
N2 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ;
PN = {s : Str; g : Gender} ;
lindef
@@ -106,9 +105,9 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV,SC] ** open ResBul, Prelude, Predef
A = \s -> {s = \\_ => s; adv = s; isPre = True};
A2 = \s -> {s = \\_ => s; adv = s; c2 = {s=""; c=Acc}};
N = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman};
N2 = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman; c2 = {s=""; c=Acc}};
N3 = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman; c2,c3 = {s=""; c=Acc}};
N = \s -> {s = \\_ => s; rel = \\_ => s; relType = Pref; g = AMasc NonHuman};
N2 = \s -> {s = \\_ => s; rel = \\_ => s; relType = Pref; g = AMasc NonHuman; c2 = {s=""; c=Acc}};
N3 = \s -> {s = \\_ => s; rel = \\_ => s; relType = Pref; g = AMasc NonHuman; c2,c3 = {s=""; c=Acc}};
linref
SSlash = \ss -> ss.s ! agrP3 (GSg Masc) ++ ss.c2.s;

View File

@@ -4,21 +4,21 @@ concrete CompatibilityBul of Compatibility = CatBul ** open Prelude, ResBul in {
-- from Noun 19/4/2008
flags
coding = cp1251 ;
coding = utf8 ;
lin
NumInt n = {s = \\_ => n.s; n = Pl; nonEmpty = True} ;
OrdInt n = {s = \\aform => n.s ++ "-" ++
case aform of {
ASg Masc Indef => "òè" ;
ASg Fem Indef => "òà" ;
ASg Neut Indef => "òî" ;
ASg Masc Def => "òèÿ" ;
ASg Fem Def => "òàòà" ;
ASg Neut Def => "òîòî" ;
ASgMascDefNom => "òèÿò" ;
APl Indef => "òè" ;
APl Def => "òèòå"
ASg Masc Indef => "ти" ;
ASg Fem Indef => "та" ;
ASg Neut Indef => "то" ;
ASg Masc Def => "тия" ;
ASg Fem Def => "тата" ;
ASg Neut Def => "тото" ;
ASgMascDefNom => "тият" ;
APl Indef => "ти" ;
APl Def => "тите"
}
} ;

View File

@@ -1,7 +1,7 @@
--# -coding=cp1251
--# -coding=utf8
concrete ConjunctionBul of Conjunction =
CatBul ** open ResBul, Coordination, Prelude, Predef in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;

View File

@@ -133,7 +133,7 @@ lin
oper
mkMonth : Str -> Str -> N = \n,a -> lin N {
s = \\_ => n ;
rel = (mkA078 a).s ; relPost = False ;
rel = (mkA078 a).s ; relType = R.AdjMod ;
g = R.AMasc R.NonHuman
} ;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -31,24 +31,29 @@ lin
tr (intagAttr "th" "colspan=\"2\"" "звателна форма" ++ td (n.s ! NFVocative)) ++
tr (intagAttr "th" "colspan=\"2\"" "бройна форма" ++ td (n.s ! NFPlCount))
) ;
s3= heading1 ("Прилагателно") ++
frameTable (
tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++
intagAttr "th" "rowspan=\"3\"" "мн.ч." ++
th "нечленувано" ++
td (n.rel ! (ASg Masc Indef))) ++
tr (th "непълен член" ++ td (n.rel ! (ASg Masc Def))) ++
tr (th "пълен член" ++ td (n.rel ! ASgMascDefNom)) ++
tr (intagAttr "th" "rowspan=\"2\"" "ж.р." ++
th "нечленувано" ++ td (n.rel ! (ASg Fem Indef))) ++
tr (th "членувано" ++ td (n.rel ! (ASg Fem Def))) ++
tr (intagAttr "th" "rowspan=\"2\"" "ср.р." ++
th "нечленувано" ++ td (n.rel ! (ASg Neut Indef))) ++
tr (th "членувано" ++ td (n.rel ! (ASg Neut Def))) ++
tr (intagAttr "th" "colspan=\"2\" rowspan=\"2\"" "мн.ч." ++
th "нечленувано" ++ td (n.rel ! (APl Indef))) ++
tr (th "членувано" ++ td (n.rel ! (APl Def)))
)
s3= case n.relType of {
Pref => [] ;
AdjMod => heading1 ("Прилагателно") ++
frameTable (
tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++
intagAttr "th" "rowspan=\"3\"" "мн.ч." ++
th "нечленувано" ++
td (n.rel ! (ASg Masc Indef))) ++
tr (th "непълен член" ++ td (n.rel ! (ASg Masc Def))) ++
tr (th "пълен член" ++ td (n.rel ! ASgMascDefNom)) ++
tr (intagAttr "th" "rowspan=\"2\"" "ж.р." ++
th "нечленувано" ++ td (n.rel ! (ASg Fem Indef))) ++
tr (th "членувано" ++ td (n.rel ! (ASg Fem Def))) ++
tr (intagAttr "th" "rowspan=\"2\"" "ср.р." ++
th "нечленувано" ++ td (n.rel ! (ASg Neut Indef))) ++
tr (th "членувано" ++ td (n.rel ! (ASg Neut Def))) ++
tr (intagAttr "th" "colspan=\"2\" rowspan=\"2\"" "мн.ч." ++
th "нечленувано" ++ td (n.rel ! (APl Indef))) ++
tr (th "членувано" ++ td (n.rel ! (APl Def)))
) ;
AdvMod => heading1 ("Наречие") ++
paragraph (n.rel ! (ASg Masc Def))
}
} ;
InflectionN2,InflectionN3 = \n -> {
@@ -95,7 +100,7 @@ lin
tr (th "членувано" ++ td (a.s ! (APl Def)))
) ++
heading1 ("Наречие") ++
paragraph (a.s ! (ASg Neut Indef)) ;
paragraph (a.adv) ;
s3= ""
} ;
@@ -136,7 +141,7 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение";
s2= inflVerb v ;
s3= ""
@@ -152,9 +157,9 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "арг1"++
v.c3.s ++
linPrep v.c3 ++
pp "арг2";
s2= inflVerb v ;
s3= ""
@@ -169,9 +174,9 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение"++
v.c3.s ++
linPrep v.c3 ++
"да" ++ pp "глагол";
s2= inflVerb v ;
s3= ""
@@ -186,9 +191,9 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение"++
v.c3.s ++
linPrep v.c3 ++
"че" ++ pp "изречение";
s2= inflVerb v ;
s3= ""
@@ -203,9 +208,9 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение"++
v.c3.s ++
linPrep v.c3 ++
pp "въпрос";
s2= inflVerb v ;
s3= ""
@@ -220,7 +225,7 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение"++
pp "прилагателно";
s2= inflVerb v ;

View File

@@ -1,5 +1,7 @@
--# -path=.:../abstract:../common:prelude
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul, MorphoFunsBul in {
flags
coding=utf8;
lin
GenModNP num np cn = DetCN (DetQuant DefArt num) (AdvCN cn (PrepNP (mkPrep "на") np)) ;
@@ -7,18 +9,19 @@ lin
AdAdV a adv = {s = a.s ++ adv.s; p = adv.p} ;
EmptyRelSlash slash = {
s = \\t,a,p,agr => slash.c2.s ++ whichRP ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main
s = \\t,a,p,agr => linPrep slash.c2 ++ whichRP ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main
} ;
CompoundN n1 n2 =
let comp : NForm => Str
= \\nf => case n1.relPost of {
True => n2.s ! nf ++ n1.rel ! nform2aform nf n2.g ;
False => n1.rel ! nform2aform nf n2.g ++ n2.s ! indefNForm nf
= \\nf => case n1.relType of {
Pref => n1.rel ! nform2aform nf n2.g ++ n2.s ! nf ;
AdjMod => n1.rel ! nform2aform nf n2.g ++ n2.s ! indefNForm nf ;
AdvMod => n2.s ! nf ++ n1.rel ! nform2aform nf n2.g
}
in {
s = comp ;
rel = \\af => "на" ++ comp ! NF Sg Def ; relPost = True ;
rel = \\af => "на" ++ comp ! NF Sg Def ; relType = AdvMod ;
g = n2.g
} ;
@@ -71,9 +74,10 @@ lin
{s = vp.ad.s ++
vp.s ! Imperf ! VGerund ++
case vp.vtype of {
VNormal => "" ;
VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
VNormal => vp.clitics ;
VMedial c => vp.clitics++reflClitics ! c ;
VPhrasal Dat => personalClitics (agrP3 (GSg Masc)) ! Dat++vp.clitics ;
VPhrasal c => vp.clitics++personalClitics (agrP3 (GSg Masc)) ! c
} ++
vp.compl ! {gn=GSg Neut; p=P3}} ;
@@ -101,9 +105,14 @@ lin
UttVPShort vp = {
s = let agr = agrP3 (GSg Neut) ;
clitic = case vp.vtype of {
VNormal => {s=[]; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
VNormal => {s=vp.clitics; agr=agr} ;
VMedial c => {s=vp.clitics++reflClitics ! c; agr=agr} ;
VPhrasal c => {s=case c of {
Dat => personalClitics agr ! c++vp.clitics;
c => vp.clitics++personalClitics agr ! c
} ;
agr={gn=GSg Neut; p=P3}
}
} ;
in vp.ad.s ++ clitic.s ++
vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++

View File

@@ -1,7 +1,7 @@
--# -coding=cp1251
--# -coding=utf8
concrete ExtraBul of ExtraBulAbs = CatBul **
open ResBul, MorphoFunsBul, Coordination, Prelude, Predef in {
flags coding=cp1251 ;
flags coding=utf8 ;
lin
@@ -30,21 +30,21 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
s = \\t,a,p,agr => slash.c2.s ++ whichRP ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main
} ;
i8fem_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Fem) PronP1 ;
i8neut_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Neut) PronP1 ;
i8fem_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Fem) PronP1 ;
i8neut_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Neut) PronP1 ;
whatSg8fem_IP = mkIP "êàêâà" "êàêâà" (GSg Fem) ;
whatSg8neut_IP = mkIP "êàêâî" "êàêâî" (GSg Neut) ;
whatSg8fem_IP = mkIP "каква" "каква" (GSg Fem) ;
whatSg8neut_IP = mkIP "какво" "какво" (GSg Neut) ;
whoSg8fem_IP = mkIP "êîÿ" "êîãî" (GSg Fem) ;
whoSg8neut_IP = mkIP "êîå" "êîãî" (GSg Neut) ;
whoSg8fem_IP = mkIP "коя" "кого" (GSg Fem) ;
whoSg8neut_IP = mkIP "кое" "кого" (GSg Neut) ;
youSg8fem_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Fem) PronP2 ;
youSg8neut_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Neut) PronP2 ;
youSg8fem_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Fem) PronP2 ;
youSg8neut_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Neut) PronP2 ;
onePl_Num = {s = table {
CFMasc Indef _ | CFFem Indef | CFNeut Indef => "åäíè" ;
CFMasc Def _ | CFMascDefNom _ | CFFem Def | CFNeut Def => "åäíèòå"
CFMasc Indef _ | CFFem Indef | CFNeut Indef => "едни" ;
CFMasc Def _ | CFMascDefNom _ | CFFem Def | CFNeut Def => "едните"
} ;
nn = NCountable;
nonEmpty = True
@@ -53,7 +53,7 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
UttImpSg8fem pol imp = {s = pol.s ++ imp.s ! pol.p ! GSg Fem} ;
UttImpSg8neut pol imp = {s = pol.s ++ imp.s ! pol.p ! GSg Fem} ;
IAdvAdv adv = {s = \\qf => (mkIAdv "êîëêî").s ! qf ++ adv.s} ;
IAdvAdv adv = {s = \\qf => (mkIAdv "колко").s ! qf ++ adv.s} ;
lincat
VPI = {s : Agr => Str} ;
@@ -95,7 +95,7 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ;
PassAgentVPSlash vp np =
insertObj (\\_ => "îò" ++ np.s ! RObj CPrep) Pos
insertObj (\\_ => "от" ++ np.s ! RObj CPrep) Pos
(insertObj (\\a => vp.ad.s ++ vp.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc)) ++
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe)) ;

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
abstract ExtraBulAbs = Extra ** {
flags coding=cp1251 ;
flags coding=utf8 ;
fun

View File

@@ -1,5 +1,5 @@
--# -path=.:../abstract:../common:prelude
--# -coding=cp1251
--# -coding=utf8
concrete GrammarBul of Grammar =
NounBul,
@@ -17,7 +17,7 @@ concrete GrammarBul of Grammar =
IdiomBul,
TenseX - [CAdv,IAdv,AdV,SC]
** {
flags coding=cp1251 ;
flags coding=utf8 ;
flags startcat = Phr ; unlexer = text ; lexer = text ;

View File

@@ -1,19 +1,19 @@
--# -coding=cp1251
--# -coding=utf8
concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
lin
ImpersCl vp = mkClause [] (GSg Neut) (NounP3 Pos) vp ;
GenericCl vp = mkClause "íÿêîé" (GSg Neut) (NounP3 Pos) vp ;
GenericCl vp = mkClause "някой" (GSg Neut) (NounP3 Pos) vp ;
CleftNP np rs =
mkClause (np.s ! RSubj)
(GSg Neut) np.p
(insertObj (\\_ => thisRP ! np.gn ++ rs.s ! personAgr np.gn np.p) (personPol np.p) (predV verbBe)) ;
CleftAdv ad s = {s = \\t,a,p,o => case p of {Pos=>[]; Neg=>"íå"} ++ ad.s ++ s.s } ;
CleftAdv ad s = {s = \\t,a,p,o => case p of {Pos=>[]; Neg=>"не"} ++ ad.s ++ s.s } ;
ExistNP np = ExistNPAdv np (lin Adv {s = ""}) ;
ExistIP ip = ExistIPAdv ip (lin Adv {s = ""}) ;
@@ -21,8 +21,8 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
ExistNPAdv np adv =
{ s = \\t,a,p,o =>
let verb = case orPol p (personPol np.p) of {
Pos => mkV186 "èìàì" ;
Neg => mkV186 "íÿìàì"
Pos => mkV186 "имам" ;
Neg => mkV186 "нямам"
} ;
agr=agrP3 (GSg Neut);
@@ -42,21 +42,21 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
<Pres,Anter> => {aux1=[]; aux2=auxPres; main=perfect} ; --# notpresent
<Past,Simul> => {aux1=[]; aux2=[]; main=aorist} ; --# notpresent
<Past,Anter> => {aux1=[]; aux2=auxAorist; main=perfect} ; --# notpresent
<Fut, Simul> => {aux1="ùå"; aux2=[]; main=present} ; --# notpresent
<Fut, Anter> => {aux1="ùå"++auxPres; aux2=[]; main=perfect} ; --# notpresent
<Fut, Simul> => {aux1="ще"; aux2=[]; main=present} ; --# notpresent
<Fut, Anter> => {aux1="ще"++auxPres; aux2=[]; main=perfect} ; --# notpresent
<Cond,_> => {aux1=auxCondS; aux2=[]; main=perfect} --# notpresent
} ;
in case o of {
Main => v.aux1 ++ v.main ++ v.aux2 ++ np.s ! RObj Acc ++ adv.s ;
Inv => np.s ! RObj Acc ++ v.aux1 ++ v.main ++ v.aux2 ++ adv.s ;
Quest => v.aux1 ++ v.main ++ "ëè" ++ v.aux2 ++ np.s ! RObj Acc ++ adv.s
Quest => v.aux1 ++ v.main ++ "ли" ++ v.aux2 ++ np.s ! RObj Acc ++ adv.s
}
} ;
ExistIPAdv ip adv =
mkQuestion {s = ip.s ! RSubj}
(mkClause "òóê" ip.gn (NounP3 Pos) (insertObj (\\_ => adv.s) Pos (predV verbBe))) ;
(mkClause "тук" ip.gn (NounP3 Pos) (insertObj (\\_ => adv.s) Pos (predV verbBe))) ;
ProgrVP vp = {
s = \\_ => vp.s ! Imperf ;
@@ -68,6 +68,6 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
isSimple = False
} ;
ImpPl1 vp = {s = "íåêà" ++ daComplex Simul Pos vp ! Perf ! {gn = GPl ; p = P1}} ;
ImpPl1 vp = {s = "нека" ++ daComplex Simul Pos vp ! Perf ! {gn = GPl ; p = P1}} ;
}

View File

@@ -1,383 +1,383 @@
--# -path=.:prelude
--# -coding=cp1251
--# -coding=utf8
concrete LexiconBul of Lexicon = CatBul **
open ParadigmsBul, ResBul, Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags
optimize=values ;
lin
airplane_N = mkN007 "ñàìîëåò" ;
answer_V2S = mkV2S (actionV (mkV187 "îòãîâàðÿì") (mkV173 "îòãîâîðÿ")) naP noPrep ;
apartment_N = mkN007 "àïàðòàìåíò" ;
apple_N = mkN041 "ÿáúëêà" ;
art_N = mkN054 "èçêóñòâî" ;
ask_V2Q = mkV2Q (stateV (mkV186 "ïèòàì")) noPrep noPrep ;
baby_N = mkN065 "áåáå" ;
bad_A = mkA076 "ëîø" ;
bank_N = mkN041 "áàíêà" ;
beautiful_A = mkA076 "êðàñèâ" ;
become_VA = mkVA (actionV (mkV186 "ñòàâàì") (mkV152 "ñòàíà")) ;
beer_N = mkN041 "áèðà" ;
beg_V2V = mkV2V (stateV (mkV173 "ìîëÿ")) noPrep zaP ;
big_A = mkA081 "ãîëÿì" ;
bike_N = mkN061 "êîëåëî" ;
bird_N = mkN041 "ïòèöà" ;
black_A = mkA079 "÷åðåí" ;
blue_A = mkA086 "ñèí" ;
boat_N = mkN007 "êîðàá" ;
book_N = mkN041 "êíèãà" ;
boot_N = mkN041 "îáóâêà" ;
boss_N = mkN001 "øåô" ;
boy_N = mkN065 "ìîì÷å" ;
bread_N = mkN001 "õëÿá" ;
break_V2 = dirV2 (actionV (mkV173 "÷óïÿ") (mkV173 "ñ÷óïÿ")) ;
broad_A = mkA079 "îáøèðåí" ;
brother_N2 = prepN2 (mkN025 "áðàò") naP ;
brown_A = mkA076 "êàôÿâ" ;
butter_N = mkN054 "ìàñëî" ;
buy_V2 = dirV2 (actionV (mkV186 "êóïóâàì") (mkV173 "êóïÿ")) ;
camera_N = mkN041 "êàìåðà" ;
cap_N = mkN041 "øàïêà" ;
car_N = mkN041 "êîëà" ;
carpet_N = mkN007 "êèëèì" ;
cat_N = mkN041 "êîòêà" ;
ceiling_N = mkN007 "òàâàí" ;
chair_N = mkN001 "ñòîë" ;
cheese_N = mkN066 "ñèðåíå" ;
child_N = mkN067 "äåòå" ;
church_N = mkN041 "öúðêâà" ;
city_N = mkN001 "ãðàä" ;
clean_A = mkA076 "÷èñò" ;
clever_A = mkA079 "óìåí" ;
close_V2 = dirV2 (actionV (mkV187 "çàòâàðÿì") (mkV173 "çàòâîðÿ")) ;
coat_N = mkN054 "ïàëòî" ;
cold_A = mkA076 "ñòóäåí" ;
come_V = actionV (mkV186 "èäâàì") (table { -- special case "äîéäè", "äîéäåòå" are archaic
VImperative Sg => "åëà";
VImperative Pl => "åëàòå";
vform => mkV146a "äîéäà" ! vform}) ;
computer_N = mkN009 "êîìïþòúð" ;
country_N = mkN041 "äúðæàâà" ;
cousin_N = mkN007a "áðàòîâ÷åä" ;
cow_N = mkN041 "êðàâà" ;
die_V = actionV (mkV186 "óìèðàì") (mkV150a "óìðà") ;
dirty_A = mkA079 "ìðúñåí" ;
distance_N3 = prepN3 (mkN072 "ðàçñòîÿíèå") otP doP ;
doctor_N = mkN007a "äîêòîð" ;
dog_N = mkN065 "êó÷å" ;
door_N = mkN041 "âðàòà" ;
drink_V2 = dirV2 (stateV (mkV163 "ïèÿ")) ;
easy_A2V = mkA2V (mkA079 "ëåñåí") zaP ;
eat_V2 = dirV2 (stateV (mkV169 "ÿì")) ;
empty_A = mkA079 "ïðàçåí" ;
enemy_N = mkN001 "âðàã" ;
factory_N = mkN041 "ôàáðèêà" ;
father_N2 = prepN2 (mkN038 "áàùà") naP ;
fear_VS = mkVS (stateV (mkV186 "ñòðàõóâàì")) ;
find_V2 = dirV2 (actionV (mkV186 "íàìèðàì") (mkV173 "íàìåðÿ")) ;
fish_N = mkN041 "ðèáà" ;
floor_N = mkN007 "åòàæ" ;
fridge_N = mkN007 "ôðèçåð" ;
friend_N = mkN031a "ïðèÿòåë" ;
fruit_N = mkN001 "ïëîä" ;
fun_AV = mkA079 "çàáàâåí" ;
forget_V2 = dirV2 (actionV (mkV187 "çàáðàâÿì") (mkV173 "çàáðàâÿ")) ;
garden_N = mkN041 "ãðàäèíà" ;
girl_N = mkN065 "ìîìè÷å" ;
glove_N = mkN041 "ðúêàâèöà" ;
gold_N = mkN054 "çëàòî" ;
good_A = adjAdv (mkA080 "äîáúð") "äîáðå" ;
go_V = actionV (mkV186 "îòèâàì") (mkV146 "îòèäà") ;
green_A = mkA076 "çåëåí" ;
harbour_N = mkN066 "ïðèñòàíèùå" ;
hate_V2 = dirV2 (stateV (mkV173 "ìðàçÿ")) ;
hat_N = mkN041 "øàïêà" ;
hear_V2 = dirV2 (actionV (mkV186 "÷óâàì") (mkV163 "÷óÿ")) ;
hill_N = mkN001 "õúëì" ;
hope_VS = mkVS (medialV (stateV (mkV186 "íàäÿâàì")) Acc) ;
horse_N = mkN035 "êîí" ;
hot_A = mkA076 "ãîðåù" ;
house_N = mkN041 "êúùà" ;
important_A = mkA079 "âàæåí" ;
industry_N = mkN047 "èíäóñòðèÿ" ;
iron_N = mkN057 "æåëÿçî" ;
king_N = mkN035a "öàð" ;
airplane_N = mkN007 "самолет" ;
answer_V2S = mkV2S (actionV (mkV187 "отговарям") (mkV173 "отговоря")) naP noPrep ;
apartment_N = mkN007 "апартамент" ;
apple_N = mkN041 "ябълка" ;
art_N = mkN054 "изкуство" ;
ask_V2Q = mkV2Q (stateV (mkV186 "питам")) noPrep noPrep ;
baby_N = mkN065 "бебе" ;
bad_A = mkA076 "лош" ;
bank_N = mkN041 "банка" ;
beautiful_A = mkA076 "красив" ;
become_VA = mkVA (actionV (mkV186 "ставам") (mkV152 "стана")) ;
beer_N = mkN041 "бира" ;
beg_V2V = mkV2V (stateV (mkV173 "моля")) noPrep zaP ;
big_A = mkA081 "голям" ;
bike_N = mkN061 "колело" ;
bird_N = mkN041 "птица" ;
black_A = mkA079 "черен" ;
blue_A = mkA086 "син" ;
boat_N = mkN007 "кораб" ;
book_N = mkN041 "книга" ;
boot_N = mkN041 "обувка" ;
boss_N = mkN001 "шеф" ;
boy_N = mkN065 "момче" ;
bread_N = mkN001 "хляб" ;
break_V2 = dirV2 (actionV (mkV173 "чупя") (mkV173 "счупя")) ;
broad_A = mkA079 "обширен" ;
brother_N2 = prepN2 (mkN025 "брат") naP ;
brown_A = mkA076 "кафяв" ;
butter_N = mkN054 "масло" ;
buy_V2 = dirV2 (actionV (mkV186 "купувам") (mkV173 "купя")) ;
camera_N = mkN041 "камера" ;
cap_N = mkN041 "шапка" ;
car_N = mkN041 "кола" ;
carpet_N = mkN007 "килим" ;
cat_N = mkN041 "котка" ;
ceiling_N = mkN007 "таван" ;
chair_N = mkN001 "стол" ;
cheese_N = mkN066 "сирене" ;
child_N = mkN067 "дете" ;
church_N = mkN041 "църква" ;
city_N = mkN001 "град" ;
clean_A = mkA076 "чист" ;
clever_A = mkA079 "умен" ;
close_V2 = dirV2 (actionV (mkV187 "затварям") (mkV173 "затворя")) ;
coat_N = mkN054 "палто" ;
cold_A = mkA076 "студен" ;
come_V = actionV (mkV186 "идвам") (table { -- special case "дойди", "дойдете" are archaic
VImperative Sg => "ела";
VImperative Pl => "елате";
vform => mkV146a "дойда" ! vform}) ;
computer_N = mkN009 "компютър" ;
country_N = mkN041 "държава" ;
cousin_N = mkN007a "братовчед" ;
cow_N = mkN041 "крава" ;
die_V = actionV (mkV186 "умирам") (mkV150a "умра") ;
dirty_A = mkA079 "мръсен" ;
distance_N3 = prepN3 (mkN072 "разстояние") otP doP ;
doctor_N = mkN007a "доктор" ;
dog_N = mkN065 "куче" ;
door_N = mkN041 "врата" ;
drink_V2 = dirV2 (stateV (mkV163 "пия")) ;
easy_A2V = mkA2V (mkA079 "лесен") zaP ;
eat_V2 = dirV2 (stateV (mkV169 "ям")) ;
empty_A = mkA079 "празен" ;
enemy_N = mkN001 "враг" ;
factory_N = mkN041 "фабрика" ;
father_N2 = prepN2 (mkN038 "баща") naP ;
fear_VS = mkVS (stateV (mkV186 "страхувам")) ;
find_V2 = dirV2 (actionV (mkV186 "намирам") (mkV173 "намеря")) ;
fish_N = mkN041 "риба" ;
floor_N = mkN007 "етаж" ;
fridge_N = mkN007 "фризер" ;
friend_N = mkN031a "приятел" ;
fruit_N = mkN001 "плод" ;
fun_AV = mkA079 "забавен" ;
forget_V2 = dirV2 (actionV (mkV187 "забравям") (mkV173 "забравя")) ;
garden_N = mkN041 "градина" ;
girl_N = mkN065 "момиче" ;
glove_N = mkN041 "ръкавица" ;
gold_N = mkN054 "злато" ;
good_A = adjAdv (mkA080 "добър") "добре" ;
go_V = actionV (mkV186 "отивам") (mkV146 "отида") ;
green_A = mkA076 "зелен" ;
harbour_N = mkN066 "пристанище" ;
hate_V2 = dirV2 (stateV (mkV173 "мразя")) ;
hat_N = mkN041 "шапка" ;
hear_V2 = dirV2 (actionV (mkV186 "чувам") (mkV163 "чуя")) ;
hill_N = mkN001 "хълм" ;
hope_VS = mkVS (medialV (stateV (mkV186 "надявам")) Acc) ;
horse_N = mkN035 "кон" ;
hot_A = mkA076 "горещ" ;
house_N = mkN041 "къща" ;
important_A = mkA079 "важен" ;
industry_N = mkN047 "индустрия" ;
iron_N = mkN057 "желязо" ;
king_N = mkN035a "цар" ;
know_V2 = dirV2 {
s = \\_,vform => case vform of {
VPassive aform => (mkA079 "èçâåñòåí").s ! aform ;
_ => mkV162 "çíàÿ" ! vform
VPassive aform => (mkA079 "известен").s ! aform ;
_ => mkV162 "зная" ! vform
} ;
vtype = VNormal ;
lock_V = <>
} ;
know_VQ = mkVQ (actionV (mkV188 "çíàì") (mkV162 "çíàÿ")) ;
know_VS = mkVS (actionV (mkV188 "çíàì") (mkV162 "çíàÿ")) ;
lake_N = mkN054 "åçåðî" ;
lamp_N = mkN041 "ëàìïà" ;
learn_V2 = dirV2 (actionV (mkV176 "ó÷à") (mkV176 "íàó÷à")) ;
leather_N = mkN041 "êîæà" ;
leave_V2 = dirV2 (actionV (mkV187 "îñòàâÿì") (mkV173 "îñòàâÿ")) ;
like_V2 = dirV2 (actionV (mkV186 "õàðåñâàì") (mkV186 "õàðåñàì")) ;
listen_V2 = dirV2 (stateV (mkV186 "ñëóøàì")) ;
live_V = stateV (mkV160 "æèâåÿ") ;
long_A = mkA080 "äúëúã" ;
lose_V2 = dirV2 (actionV (mkV173 "ãóáÿ") (mkV173 "çàãóáÿ")) ;
love_N = mkN049 "ëþáîâ" ;
love_V2 = dirV2 (stateV (mkV186 "îáè÷àì")) ;
man_N = mkN024 "ìúæ" ;
married_A2 = mkA2 (mkA076 "æåíåí") zaP ;
meat_N = mkN054 "ìåñî" ;
milk_N = mkN057 "ìëÿêî" ;
moon_N = mkN041 "ëóíà" ;
mother_N2 = prepN2 (mkN041a "ìàéêà") naP ;
mountain_N = mkN041 "ïëàíèíà" ;
music_N = mkN041 "ìóçèêà" ;
narrow_A = mkA084 "òåñåí" ;
new_A = mkA076 "íîâ" ;
newspaper_N = mkN014 "âåñòíèê" ;
oil_N = mkN065 "îëèî" ;
old_A = mkA076 "ñòàð" ;
open_V2 = dirV2 (actionV (mkV187 "îòâàðÿì") (mkV173 "îòâîðÿ")) ;
paint_V2A = mkV2A (actionV (mkV186 "ðèñóâàì") (mkV186 "íàðèñóâàì")) noPrep ;
paper_N = mkN047 "õàðòèÿ" ;
paris_PN = mkPN "Ïàðèæ" Masc ;
peace_N = mkN040a "ìèð" ;
pen_N = mkN041 "ïèñàëêà" ;
planet_N = mkN041 "ïëàíåòà" ;
plastic_N = mkN041 "ïëàñòìàñà" ;
play_V2 = dirV2 (stateV (mkV161 "èãðàÿ")) ;
policeman_N = mkN032a "ïîëèöàé" ;
priest_N = mkN014 "ñâåùåíèê" ;
probable_AS = mkA079 "âåðîÿòåí" ;
queen_N = mkN041 "êðàëèöà" ;
radio_N = mkN054 "ðàäèî" ;
rain_V0 = mkV0 (stateV (mkV174 "âàëè")) ;
read_V2 = dirV2 (stateV (mkV145 "÷åòà")) ;
red_A = mkA076 "÷åðâåí" ;
religion_N = mkN047 "ðåëèãèÿ" ;
restaurant_N = mkN007 "ðåñòîðàíò" ;
river_N = mkN041 "ðåêà" ;
rock_N = mkN041 "ñêàëà" ;
roof_N = mkN007 "ïîêðèâ" ;
rubber_N = mkN041 "ãóìà" ;
run_V = stateV (mkV186 "áÿãàì") ;
say_VS = mkVS (actionV (mkV186 "êàçâàì") (mkV156 "êàæà")) ;
school_N = mkN066 "ó÷èëèùå" ;
science_N = mkN041 "íàóêà" ;
sea_N = mkN065 "ìîðå" ;
seek_V2 = dirV2 (stateV (mkV173 "òúðñÿ")) ;
see_V2 = dirV2 (actionV (mkV186 "âèæäàì") (mkV181 "âèäÿ")) ;
sell_V3 = dirV3 (stateV (mkV186 "ïðîäàâàì")) naP ;
send_V3 = dirV3 (actionV (mkV186 "ïðàùàì") (mkV173 "ïðàòÿ")) doP ;
sheep_N = mkN044 "îâöà" ;
ship_N = mkN007 "êîðàá" ;
shirt_N = mkN041 "ðèçà" ;
shoe_N = mkN041 "îáóâêà" ;
shop_N = mkN007 "ìàãàçèí" ;
short_A = mkA076 "êúñ" ;
silver_N = mkN054 "ñðåáðî" ;
sister_N = mkN041a "ñåñòðà" ;
sleep_V = stateV (mkV182 "ñïÿ") ;
small_A = mkA080 "ìàëúê" ;
snake_N = mkN047 "çìèÿ" ;
sock_N = mkN007 "÷îðàï" ;
speak_V2 = dirV2 (stateV (mkV173 "ãîâîðÿ")) ;
star_N = mkN041 "çâåçäà" ;
steel_N = mkN041 "ñòîìàíà" ;
stone_N = mkN017 "êàìúê" ;
stove_N = mkN041 "ïå÷êà" ;
student_N = mkN007a "ñòóäåíò" ;
stupid_A = mkA076 "ãëóïàâ" ;
sun_N = mkN066 "ñëúíöå" ;
switch8off_V2 = dirV2 (actionV (mkV186 "èçêëþ÷âàì") (mkV176 "èçêëþ÷à")) ;
switch8on_V2 = dirV2 (actionV (mkV186 "âêëþ÷âàì") (mkV176 "âêëþ÷à")) ;
table_N = mkN041 "ìàñà" ;
talk_V3 = mkV3 (stateV (mkV173 "ãîâîðÿ")) naP zaP ;
teacher_N = mkN031a "ó÷èòåë" ;
teach_V2 = dirV2 (actionV (mkV186 "ïðåïîäàâàì") (mkV168 "ïðåïîäàì")) ;
television_N = mkN047 "òåëåâèçèÿ" ;
thick_A = mkA076 "äåáåë" ;
thin_A = mkA080 "òúíúê" ;
train_N = mkN001 "âëàê" ;
travel_V = stateV (mkV186 "ïúòóâàì") ;
tree_N = mkN061 "äúðâî" ;
ugly_A = mkA076 "ãëóïàâ" ;
understand_V2 = dirV2 (actionV (mkV186 "ðàçáèðàì") (mkV170 "ðàçáåðà")) ;
university_N = mkN007 "óíèâåðñèòåò" ;
village_N = mkN054 "ñåëî" ;
wait_V2 = prepV2 (stateV (mkV186 "÷àêàì")) zaP ;
walk_V = stateV (mkV173 "õîäÿ") ;
warm_A = mkA080 "òîïúë" ;
war_N = mkN041 "âîéíà" ;
watch_V2 = dirV2 (stateV (mkV186 "ãëåäàì")) ;
water_N = mkN041 "âîäà" ;
white_A = mkA081 "áÿë" ;
window_N = mkN008 "ïðîçîðåö" ;
wine_N = mkN054 "âèíî" ;
win_V2 = dirV2 (actionV (mkV186 "ïîáåæäàâàì") (mkV174 "ïîáåäÿ")) ;
woman_N = mkN041a "æåíà" ;
wonder_VQ = mkVQ (medialV (actionV (mkV186 "ó÷óäâàì") (mkV173 "÷óäÿ")) Acc) ;
wood_N = mkN041 "äúðâåñèíà" ;
write_V2 = dirV2 (stateV (mkV159 "ïèøà")) ;
yellow_A = mkA076 "æúëò" ;
young_A = mkA076 "ìëàä" ;
do_V2 = dirV2 (actionV (mkV173 "ïðàâÿ") (mkV173 "íàïðàâÿ")) ;
now_Adv = mkAdv "ñåãà" ;
already_Adv = mkAdv "âå÷å" ;
song_N = mkN050 "ïåñåí" ;
add_V3 = dirV3 (actionV (mkV186 "ñúáèðàì") (mkV170 "ñúáåðà")) sP ;
number_N = mkN054 "÷èñëî" ;
put_V2 = prepV2 (actionV (mkV186 "ñëàãàì") (mkV176 "ñëîæà")) noPrep ;
stop_V = actionV (mkV186 "ñïèðàì") (mkV150 "ñïðà") ;
jump_V = actionV (mkV186 "ñêà÷àì") (mkV176 "ñêî÷à") ;
left_Ord = mkA081 "ëÿâ" ** {nonEmpty=True} ;
right_Ord = mkA084 "äåñåí" ** {nonEmpty=True} ;
far_Adv = mkAdv "äàëå÷å" ;
correct_A = mkA079 "ïðàâèëåí" ;
dry_A = mkA076 "ñóõ" ;
dull_A = mkA076 "òúï" ;
full_A = mkA079 "ïúëåí" ;
heavy_A = mkA080 "òåæúê" ;
near_A = mkA080 "áëèçúê" ;
rotten_A = mkA076 "ïðîãíèë" ;
round_A = mkA080 "êðúãúë" ;
sharp_A = mkA080 "îñòúð" ;
smooth_A = mkA080 "ãëàäúê" ;
straight_A = mkA081 "ïðÿê" ;
wet_A = mkA080 "ìîêúð" ; ----
wide_A = mkA076 "øèðîê" ;
animal_N = mkN062 "æèâîòíî" ;
ashes_N = mkN049 "ïåïeë" ;
back_N = mkN003 "ãðúá" ;
bark_N = mkN028 "ëàé" ;
belly_N = mkN007 "êîðåì" ;
blood_N = mkN053 "êðúâ" ;
bone_N = mkN049 "êîñò" ;
breast_N = mkN041 "ãúðäà" ;
cloud_N = mkN014 "îáëàê" ;
day_N = mkN033 "äåí" ;
dust_N = mkN001 "ïðàõ" ;
ear_N = mkN064 "óõî" ;
earth_N = mkN047 "çåìÿ" ;
egg_N = mkN066 "ÿéöå" ;
eye_N = mkN063 "îêî" ;
fat_N = mkN041 "ìàçíèíà" ;
feather_N = mkN054 "ïåðî" ;
fingernail_N = mkN034 "íîêúò" ;
fire_N = mkN030 "îãúí" ;
flower_N = mkN068 "öâåòå" ;
fog_N = mkN041 "ìúãëà" ;
foot_N = mkN041 "ñòúïêà" ;
forest_N = mkN041 "ãîðà" ;
grass_N = mkN041 "òðåâà" ;
guts_N = mkN054 "÷åðâî" ;
hair_N = mkN041 "êîñà" ;
hand_N = mkN045 "ðúêà" ;
head_N = mkN041 "ãëàâà" ;
heart_N = mkN066 "ñúðöå" ;
horn_N = mkN001 "ðîã" ;
husband_N = mkN015 "ñúïðóã" ; -- personal
ice_N = mkN001 "ëåä" ;
knee_N = mkN058 "êîëÿíî" ;
leaf_N = mkN054 "ëèñòî" ;
leg_N = mkN022 "êðàê" ;
liver_N = mkN001 "äðîá" ;
louse_N = mkN041 "âúøêà" ;
mouth_N = mkN042 "óñòà" ;
name_N = mkN069 "èìå" ;
neck_N = mkN003 "ãðúá" ;
night_N = mkN049 "íîù" ;
nose_N = mkN001 "íîñ" ;
person_N = mkN014 "÷îâåê" ;
rain_N = mkN001 "äúæä" ;
road_N = mkN037 "ïúò" ;
root_N = mkN007 "êîðåí" ;
rope_N = mkN065 "âúæå" ;
salt_N = mkN049 "ñîë" ;
sand_N = mkN014 "ïÿñúê" ;
seed_N = mkN069 "ñåìå" ;
skin_N = mkN041 "êîæà" ;
sky_N = mkN070 "íåáå" ;
smoke_N = mkN014 "ïóøåê" ;
snow_N = mkN002 "ñíÿã" ;
stick_N = mkN041 "ïðú÷êà" ;
tail_N = mkN041 "îïàøêà" ;
tongue_N = mkN014 "åçèê" ;
tooth_N = mkN007 "çúá" ;
wife_N = mkN041 "ñúïðóãà" ;
wind_N = mkN004 "âÿòúð" ;
wing_N = mkN056 "êðèëî" ;
worm_N = mkN032 "÷åðâåé" ;
year_N = mkN041 "ãîäèíà" ;
blow_V = stateV (mkV186 "äóõàì") ;
breathe_V = dirV2 (stateV (mkV186 "äèøàì")) ;
burn_V = actionV (mkV187 "èçãàðÿì") (mkV177 "èçãîðÿ") ;
dig_V = stateV (mkV161 "êîïàÿ") ;
fall_V = actionV (mkV186 "ïàäàì") (mkV152 "ïàäíà") ;
float_V = stateV (mkV186 "ïëàâàì") ;
flow_V = stateV (mkV148 "òåêà") ;
fly_V = stateV (mkV177 "ëåòÿ") ;
freeze_V = stateV (mkV186 "çàìðúçâàì") ;
give_V3 = dirV3 (actionV (mkV186 "äàâàì") (mkV186 "äàì")) naP ;
laugh_V = medialV (stateV (mkV160 "ñìåÿ")) Acc ;
lie_V = stateV (mkV178 "ëåæà") ;
play_V = stateV (mkV161 "èãðàÿ") ;
sew_V = stateV (mkV163 "øèÿ") ;
sing_V = stateV (mkV164 "ïåÿ") ;
sit_V = stateV (mkV177 "ñåäÿ") ;
smell_V = stateV (mkV159 "ìèðèøà") ;
spit_V = stateV (mkV163 "ïëþÿ") ;
stand_V = stateV (mkV180 "ñòîÿ") ;
swell_V = actionV (mkV186 "íàäóâàì") (mkV163 "íàäóÿ") ;
swim_V = stateV (mkV186 "ïëóâàì") ;
think_V = stateV (mkV173 "ìèñëÿ") ;
turn_V = actionV (mkV186 "îáðúùàì") (mkV152 "îáúðíà") ;
vomit_V = actionV (mkV186 "ïîâðúùàì") (mkV152 "ïîâúðíà") ;
know_VQ = mkVQ (actionV (mkV188 "знам") (mkV162 "зная")) ;
know_VS = mkVS (actionV (mkV188 "знам") (mkV162 "зная")) ;
lake_N = mkN054 "езеро" ;
lamp_N = mkN041 "лампа" ;
learn_V2 = dirV2 (actionV (mkV176 "уча") (mkV176 "науча")) ;
leather_N = mkN041 "кожа" ;
leave_V2 = dirV2 (actionV (mkV187 "оставям") (mkV173 "оставя")) ;
like_V2 = dirV2 (actionV (mkV186 "харесвам") (mkV186 "харесам")) ;
listen_V2 = dirV2 (stateV (mkV186 "слушам")) ;
live_V = stateV (mkV160 "живея") ;
long_A = mkA080 "дълъг" ;
lose_V2 = dirV2 (actionV (mkV173 "губя") (mkV173 "загубя")) ;
love_N = mkN049 "любов" ;
love_V2 = dirV2 (stateV (mkV186 "обичам")) ;
man_N = mkN024 "мъж" ;
married_A2 = mkA2 (mkA076 "женен") zaP ;
meat_N = mkN054 "месо" ;
milk_N = mkN057 "мляко" ;
moon_N = mkN041 "луна" ;
mother_N2 = prepN2 (mkN041a "майка") naP ;
mountain_N = mkN041 "планина" ;
music_N = mkN041 "музика" ;
narrow_A = mkA084 "тесен" ;
new_A = mkA076 "нов" ;
newspaper_N = mkN014 "вестник" ;
oil_N = mkN065 "олио" ;
old_A = mkA076 "стар" ;
open_V2 = dirV2 (actionV (mkV187 "отварям") (mkV173 "отворя")) ;
paint_V2A = mkV2A (actionV (mkV186 "рисувам") (mkV186 "нарисувам")) noPrep ;
paper_N = mkN047 "хартия" ;
paris_PN = mkPN "Париж" Masc ;
peace_N = mkN040a "мир" ;
pen_N = mkN041 "писалка" ;
planet_N = mkN041 "планета" ;
plastic_N = mkN041 "пластмаса" ;
play_V2 = dirV2 (stateV (mkV161 "играя")) ;
policeman_N = mkN032a "полицай" ;
priest_N = mkN014 "свещеник" ;
probable_AS = mkA079 "вероятен" ;
queen_N = mkN041 "кралица" ;
radio_N = mkN054 "радио" ;
rain_V0 = mkV0 (stateV (mkV174 "вали")) ;
read_V2 = dirV2 (stateV (mkV145 "чета")) ;
red_A = mkA076 "червен" ;
religion_N = mkN047 "религия" ;
restaurant_N = mkN007 "ресторант" ;
river_N = mkN041 "река" ;
rock_N = mkN041 "скала" ;
roof_N = mkN007 "покрив" ;
rubber_N = mkN041 "гума" ;
run_V = stateV (mkV186 "бягам") ;
say_VS = mkVS (actionV (mkV186 "казвам") (mkV156 "кажа")) ;
school_N = mkN066 "училище" ;
science_N = mkN041 "наука" ;
sea_N = mkN065 "море" ;
seek_V2 = dirV2 (stateV (mkV173 "търся")) ;
see_V2 = dirV2 (actionV (mkV186 "виждам") (mkV181 "видя")) ;
sell_V3 = dirV3 (stateV (mkV186 "продавам")) naP ;
send_V3 = dirV3 (actionV (mkV186 "пращам") (mkV173 "пратя")) doP ;
sheep_N = mkN044 "овца" ;
ship_N = mkN007 "кораб" ;
shirt_N = mkN041 "риза" ;
shoe_N = mkN041 "обувка" ;
shop_N = mkN007 "магазин" ;
short_A = mkA076 "къс" ;
silver_N = mkN054 "сребро" ;
sister_N = mkN041a "сестра" ;
sleep_V = stateV (mkV182 "спя") ;
small_A = mkA080 "малък" ;
snake_N = mkN047 "змия" ;
sock_N = mkN007 "чорап" ;
speak_V2 = dirV2 (stateV (mkV173 "говоря")) ;
star_N = mkN041 "звезда" ;
steel_N = mkN041 "стомана" ;
stone_N = mkN017 "камък" ;
stove_N = mkN041 "печка" ;
student_N = mkN007a "студент" ;
stupid_A = mkA076 "глупав" ;
sun_N = mkN066 "слънце" ;
switch8off_V2 = dirV2 (actionV (mkV186 "изключвам") (mkV176 "изключа")) ;
switch8on_V2 = dirV2 (actionV (mkV186 "включвам") (mkV176 "включа")) ;
table_N = mkN041 "маса" ;
talk_V3 = mkV3 (stateV (mkV173 "говоря")) naP zaP ;
teacher_N = mkN031a "учител" ;
teach_V2 = dirV2 (actionV (mkV186 "преподавам") (mkV168 "преподам")) ;
television_N = mkN047 "телевизия" ;
thick_A = mkA076 "дебел" ;
thin_A = mkA080 "тънък" ;
train_N = mkN001 "влак" ;
travel_V = stateV (mkV186 "пътувам") ;
tree_N = mkN061 "дърво" ;
ugly_A = mkA076 "глупав" ;
understand_V2 = dirV2 (actionV (mkV186 "разбирам") (mkV170 "разбера")) ;
university_N = mkN007 "университет" ;
village_N = mkN054 "село" ;
wait_V2 = prepV2 (stateV (mkV186 "чакам")) zaP ;
walk_V = stateV (mkV173 "ходя") ;
warm_A = mkA080 "топъл" ;
war_N = mkN041 "война" ;
watch_V2 = dirV2 (stateV (mkV186 "гледам")) ;
water_N = mkN041 "вода" ;
white_A = mkA081 "бял" ;
window_N = mkN008 "прозорец" ;
wine_N = mkN054 "вино" ;
win_V2 = dirV2 (actionV (mkV186 "побеждавам") (mkV174 "победя")) ;
woman_N = mkN041a "жена" ;
wonder_VQ = mkVQ (medialV (actionV (mkV186 "учудвам") (mkV173 "чудя")) Acc) ;
wood_N = mkN041 "дървесина" ;
write_V2 = dirV2 (stateV (mkV159 "пиша")) ;
yellow_A = mkA076 "жълт" ;
young_A = mkA076 "млад" ;
do_V2 = dirV2 (actionV (mkV173 "правя") (mkV173 "направя")) ;
now_Adv = mkAdv "сега" ;
already_Adv = mkAdv "вече" ;
song_N = mkN050 "песен" ;
add_V3 = dirV3 (actionV (mkV186 "събирам") (mkV170 "събера")) sP ;
number_N = mkN054 "число" ;
put_V2 = prepV2 (actionV (mkV186 "слагам") (mkV176 "сложа")) noPrep ;
stop_V = actionV (mkV186 "спирам") (mkV150 "спра") ;
jump_V = actionV (mkV186 "скачам") (mkV176 "скоча") ;
left_Ord = mkA081 "ляв" ** {nonEmpty=True} ;
right_Ord = mkA084 "десен" ** {nonEmpty=True} ;
far_Adv = mkAdv "далече" ;
correct_A = mkA079 "правилен" ;
dry_A = mkA076 "сух" ;
dull_A = mkA076 "тъп" ;
full_A = mkA079 "пълен" ;
heavy_A = mkA080 "тежък" ;
near_A = mkA080 "близък" ;
rotten_A = mkA076 "прогнил" ;
round_A = mkA080 "кръгъл" ;
sharp_A = mkA080 "остър" ;
smooth_A = mkA080 "гладък" ;
straight_A = mkA081 "пряк" ;
wet_A = mkA080 "мокър" ; ----
wide_A = mkA076 "широк" ;
animal_N = mkN062 "животно" ;
ashes_N = mkN049 "пепeл" ;
back_N = mkN003 "гръб" ;
bark_N = mkN028 "лай" ;
belly_N = mkN007 "корем" ;
blood_N = mkN053 "кръв" ;
bone_N = mkN049 "кост" ;
breast_N = mkN041 "гърда" ;
cloud_N = mkN014 "облак" ;
day_N = mkN033 "ден" ;
dust_N = mkN001 "прах" ;
ear_N = mkN064 "ухо" ;
earth_N = mkN047 "земя" ;
egg_N = mkN066 "яйце" ;
eye_N = mkN063 "око" ;
fat_N = mkN041 "мазнина" ;
feather_N = mkN054 "перо" ;
fingernail_N = mkN034 "нокът" ;
fire_N = mkN030 "огън" ;
flower_N = mkN068 "цвете" ;
fog_N = mkN041 "мъгла" ;
foot_N = mkN041 "стъпка" ;
forest_N = mkN041 "гора" ;
grass_N = mkN041 "трева" ;
guts_N = mkN054 "черво" ;
hair_N = mkN041 "коса" ;
hand_N = mkN045 "ръка" ;
head_N = mkN041 "глава" ;
heart_N = mkN066 "сърце" ;
horn_N = mkN001 "рог" ;
husband_N = mkN015 "съпруг" ; -- personal
ice_N = mkN001 "лед" ;
knee_N = mkN058 "коляно" ;
leaf_N = mkN054 "листо" ;
leg_N = mkN022 "крак" ;
liver_N = mkN001 "дроб" ;
louse_N = mkN041 "въшка" ;
mouth_N = mkN042 "уста" ;
name_N = mkN069 "име" ;
neck_N = mkN003 "гръб" ;
night_N = mkN049 "нощ" ;
nose_N = mkN001 "нос" ;
person_N = mkN014 "човек" ;
rain_N = mkN001 "дъжд" ;
road_N = mkN037 "път" ;
root_N = mkN007 "корен" ;
rope_N = mkN065 "въже" ;
salt_N = mkN049 "сол" ;
sand_N = mkN014 "пясък" ;
seed_N = mkN069 "семе" ;
skin_N = mkN041 "кожа" ;
sky_N = mkN070 "небе" ;
smoke_N = mkN014 "пушек" ;
snow_N = mkN002 "сняг" ;
stick_N = mkN041 "пръчка" ;
tail_N = mkN041 "опашка" ;
tongue_N = mkN014 "език" ;
tooth_N = mkN007 "зъб" ;
wife_N = mkN041 "съпруга" ;
wind_N = mkN004 "вятър" ;
wing_N = mkN056 "крило" ;
worm_N = mkN032 "червей" ;
year_N = mkN041 "година" ;
blow_V = stateV (mkV186 "духам") ;
breathe_V = dirV2 (stateV (mkV186 "дишам")) ;
burn_V = actionV (mkV187 "изгарям") (mkV177 "изгоря") ;
dig_V = stateV (mkV161 "копая") ;
fall_V = actionV (mkV186 "падам") (mkV152 "падна") ;
float_V = stateV (mkV186 "плавам") ;
flow_V = stateV (mkV148 "тека") ;
fly_V = stateV (mkV177 "летя") ;
freeze_V = stateV (mkV186 "замръзвам") ;
give_V3 = dirV3 (actionV (mkV186 "давам") (mkV186 "дам")) naP ;
laugh_V = medialV (stateV (mkV160 "смея")) Acc ;
lie_V = stateV (mkV178 "лежа") ;
play_V = stateV (mkV161 "играя") ;
sew_V = stateV (mkV163 "шия") ;
sing_V = stateV (mkV164 "пея") ;
sit_V = stateV (mkV177 "седя") ;
smell_V = stateV (mkV159 "мириша") ;
spit_V = stateV (mkV163 "плюя") ;
stand_V = stateV (mkV180 "стоя") ;
swell_V = actionV (mkV186 "надувам") (mkV163 "надуя") ;
swim_V = stateV (mkV186 "плувам") ;
think_V = stateV (mkV173 "мисля") ;
turn_V = actionV (mkV186 "обръщам") (mkV152 "обърна") ;
vomit_V = actionV (mkV186 "повръщам") (mkV152 "повърна") ;
bite_V2 = dirV2 (stateV (mkV154 "õàïÿ")) ;
count_V2 = dirV2 (stateV (mkV175 "áðîÿ")) ;
cut_V2 = dirV2 (stateV (mkV157 "ðåæà")) ;
fear_V2 = prepV2 (medialV (stateV (mkV186 "ñòðàõóâàì")) Acc) otP;
fight_V2 = prepV2 (medialV (stateV (mkV173 "áîðÿ")) Acc) sP;
hit_V2 = dirV2 (actionV (mkV187 "óäðÿì") (mkV173 "óäàðÿ")) ;
hold_V2 = dirV2 (stateV (mkV179 "äúðæà")) ;
hunt_V2 = dirV2 (stateV (mkV174 "ëîâÿ")) ;
kill_V2 = dirV2 (actionV (mkV186 "óáèâàì") (mkV163 "óáèÿ")) ;
pull_V2 = dirV2 (stateV (mkV186 "äúðïàì")) ;
push_V2 = dirV2 (stateV (mkV186 "áóòàì")) ;
rub_V2 = dirV2 (stateV (mkV163 "òðèÿ")) ;
scratch_V2 = dirV2 (actionV (mkV186 "äðàñêàì") (mkV152 "äðàñíà")) ;
split_V2 = dirV2 (actionV (mkV187 "ðàçäåëÿì") (mkV174 "ðàçäåëÿ")) ;
squeeze_V2 = dirV2 (actionV (mkV186 "ñòèñêàì") (mkV152 "ñòèñíà")) ;
stab_V2 = dirV2 (actionV (mkV186 "ïðîìóøâàì") (mkV176 "ïðîìóøà")) ;
suck_V2 = dirV2 (stateV (mkV155 "ñó÷à")) ;
throw_V2 = dirV2 (actionV (mkV187 "õâúðëÿì") (mkV173 "õâúðëÿ")) ;
tie_V2 = dirV2 (actionV (mkV186 "âðúçâàì") (mkV156 "âúðæà")) ;
wash_V2 = dirV2 (stateV (mkV163 "ìèÿ")) ;
wipe_V2 = dirV2 (stateV (mkV159 "áúðøà")) ;
bite_V2 = dirV2 (stateV (mkV154 "хапя")) ;
count_V2 = dirV2 (stateV (mkV175 "броя")) ;
cut_V2 = dirV2 (stateV (mkV157 "режа")) ;
fear_V2 = prepV2 (medialV (stateV (mkV186 "страхувам")) Acc) otP;
fight_V2 = prepV2 (medialV (stateV (mkV173 "боря")) Acc) sP;
hit_V2 = dirV2 (actionV (mkV187 "удрям") (mkV173 "ударя")) ;
hold_V2 = dirV2 (stateV (mkV179 "държа")) ;
hunt_V2 = dirV2 (stateV (mkV174 "ловя")) ;
kill_V2 = dirV2 (actionV (mkV186 "убивам") (mkV163 "убия")) ;
pull_V2 = dirV2 (stateV (mkV186 "дърпам")) ;
push_V2 = dirV2 (stateV (mkV186 "бутам")) ;
rub_V2 = dirV2 (stateV (mkV163 "трия")) ;
scratch_V2 = dirV2 (actionV (mkV186 "драскам") (mkV152 "драсна")) ;
split_V2 = dirV2 (actionV (mkV187 "разделям") (mkV174 "разделя")) ;
squeeze_V2 = dirV2 (actionV (mkV186 "стискам") (mkV152 "стисна")) ;
stab_V2 = dirV2 (actionV (mkV186 "промушвам") (mkV176 "промуша")) ;
suck_V2 = dirV2 (stateV (mkV155 "суча")) ;
throw_V2 = dirV2 (actionV (mkV187 "хвърлям") (mkV173 "хвърля")) ;
tie_V2 = dirV2 (actionV (mkV186 "връзвам") (mkV156 "вържа")) ;
wash_V2 = dirV2 (stateV (mkV163 "мия")) ;
wipe_V2 = dirV2 (stateV (mkV159 "бърша")) ;
grammar_N = mkN041 "ãðàìàòèêà" ;
language_N = mkN014 "åçèê" ;
rule_N = mkN054 "ïðàâèëî" ;
grammar_N = mkN041 "граматика" ;
language_N = mkN014 "език" ;
rule_N = mkN054 "правило" ;
john_PN = mkPN "Äæîí" Masc ;
question_N = mkN007 "âúïðîñ" ;
ready_A = mkA076 "ãîòîâ" ;
reason_N = mkN041 "ïðè÷èíà" ;
today_Adv = mkAdv "äíåñ" ;
uncertain_A = mkA079 "íåÿñåí" ;
john_PN = mkPN "Джон" Masc ;
question_N = mkN007 "въпрос" ;
ready_A = mkA076 "готов" ;
reason_N = mkN041 "причина" ;
today_Adv = mkAdv "днес" ;
uncertain_A = mkA079 "неясен" ;
oper
zaP = mkPrep "çà" Acc ;
zaP = mkPrep "за" Acc ;
naP = mkPrep [] Dat ;
otP = mkPrep "îò" Acc ;
doP = mkPrep "äî" Acc ;
sP = mkPrep (pre { "ñ" ;
"ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"}
otP = mkPrep "от" Acc ;
doP = mkPrep "до" Acc ;
sP = mkPrep (pre { "с" ;
"със" / strs {"с" ; "з" ; "С" ; "З"}
}) Acc ;
} ;

View File

@@ -1,5 +1,5 @@
--# -path=.:../../prelude
--# -coding=cp1251
--# -coding=utf8
--1 A Simple English Resource Morphology
--
@@ -14,7 +14,7 @@ resource MorphoBul = ResBul ** open
Prelude,
CatBul
in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all ;
@@ -95,73 +95,73 @@ oper
\cheta,chete,chetoh,chetqh,chel,chetql,cheten,chetqst,cheti,chetene ->
table {
VPres Sg P1 => cheta;
VPres Sg P2 => chete + "ø";
VPres Sg P2 => chete + "ш";
VPres Sg P3 => chete;
VPres Pl P1 => case chete of {
_ + ("à"|"ÿ") => chete + "ìå";
_ => chete + "ì"
_ + ("а"|"я") => chete + "ме";
_ => chete + "м"
};
VPres Pl P2 => chete + "òå";
VPres Pl P2 => chete + "те";
VPres Pl P3 => case cheta of {
vika + "ì" => case chete of {
zn + "àå" => zn + "àÿò";
dad + "å" => dad + "àò";
vika => vika + "ò"
vika + "м" => case chete of {
zn + "ае" => zn + "аят";
dad + "е" => dad + "ат";
vika => vika + "т"
};
_ => cheta + "ò"
_ => cheta + "т"
};
VAorist Sg P1 => chetoh;
VAorist Sg _ => case chetoh of {
chet+"îõ" => chete;
zova+ "õ" => zova
chet+"ох" => chete;
zova+ "х" => zova
};
VAorist Pl P1 => chetoh + "ìå";
VAorist Pl P2 => chetoh + "òå";
VAorist Pl P3 => chetoh + "à";
VAorist Pl P1 => chetoh + "ме";
VAorist Pl P2 => chetoh + "те";
VAorist Pl P3 => chetoh + "а";
VImperfect Sg P1 => chetqh;
VImperfect Sg _ => case chete of {
rabot + "è" => rabot + "eøå";
_ => chete + "øå"
rabot + "и" => rabot + "eше";
_ => chete + "ше"
};
VImperfect Pl P1 => chetqh + "ìå";
VImperfect Pl P2 => chetqh + "òå";
VImperfect Pl P3 => chetqh + "à";
VImperfect Pl P1 => chetqh + "ме";
VImperfect Pl P2 => chetqh + "те";
VImperfect Pl P3 => chetqh + "а";
VPerfect aform =>let chel1 : Str =
case chel of {
pas+"úë" => pas+"ë";
pas+"ъл" => pas+"л";
_ => chel
} ;
chel2 : Str =
case chel of {
w+"ëÿçúë" => w+"ëåçë";
w+"лязъл" => w+"лезл";
_ => chel
}
in (mkAdjective chel
(chel2+"èÿ")
(chel2+"èÿò")
(chel2+"ия")
(chel2+"ият")
(chel1+"a")
(chel1+"àòà")
(chel1+"î")
(chel1+"îòî")
(ia2e chel1+"è")
(ia2e chel1+"èòå")).s ! aform ;
(chel1+"ата")
(chel1+"о")
(chel1+"ото")
(ia2e chel1+"и")
(ia2e chel1+"ите")).s ! aform ;
VPluPerfect aform => regAdjective chetql ! aform ;
VPassive aform => regAdjective cheten ! aform ;
VPresPart aform => regAdjective chetqst ! aform ;
VImperative Sg => cheti;
VImperative Pl => case cheti of {
chet + "è" => chet + "åòå";
ela => ela + "òå"
chet + "и" => chet + "ете";
ela => ela + "те"
};
VNoun nform => let v0 = init chetene
in (mkNoun (v0+"å")
(v0+"èÿ")
(v0+"èÿ")
(v0+"å")
in (mkNoun (v0+"е")
(v0+"ия")
(v0+"ия")
(v0+"е")
ANeut) ! nform;
VGerund => case chete of {
rabot + "è" => rabot + "åéêè";
_ => chete + "éêè"
rabot + "и" => rabot + "ейки";
_ => chete + "йки"
}
} ;
@@ -172,51 +172,51 @@ oper
table {
NF Sg Indef => sg ;
NF Sg Def => case sg of {
_+"à"=>sg+"òà" ;
_+"ÿ"=>sg+"òà" ;
_+"î"=>sg+"òî" ;
_+"ó"=>sg+"òî" ;
_+"å"=>sg+"òî" ;
_+"è"=>sg+"òî" ;
s+"é"=>s +"ÿ" ;
_+("úð")
=>sg +"à" ;
_+("òåë"|"àð"|"ÿð"|"äåí"
|"ïúò"|"îãúí"|"ñúí"
|"êîí"|"êðàë"|"öàð"
|"çåò"|"ëàêúò"|"íîêúò")
=>sg +"ÿ" ;
_+"а"=>sg+"та" ;
_+"я"=>sg+"та" ;
_+"о"=>sg+"то" ;
_+"у"=>sg+"то" ;
_+"е"=>sg+"то" ;
_+"и"=>sg+"то" ;
s+"й"=>s +"я" ;
_+("ър")
=>sg +"а" ;
_+("тел"|"ар"|"яр"|"ден"
|"път"|"огън"|"сън"
|"кон"|"крал"|"цар"
|"зет"|"лакът"|"нокът")
=>sg +"я" ;
_ =>case g of {
AFem => sg+"òà" ;
_ => sg+"à"
AFem => sg+"та" ;
_ => sg+"а"
}
} ;
NF Pl Indef => pl ;
NF Pl Def => case pl of {
_+"à"=>pl+"òà" ;
_+"å"=>pl+"òå" ;
_+"è"=>pl+"òå" ;
_+"ÿ"=>pl+"òà" ;
_ =>pl+"òå"
_+"а"=>pl+"та" ;
_+"е"=>pl+"те" ;
_+"и"=>pl+"те" ;
_+"я"=>pl+"та" ;
_ =>pl+"те"
} ;
NFSgDefNom => case sg of {
_+"à"=>sg+"òà" ;
_+"ÿ"=>sg+"òà" ;
_+"î"=>sg+"òî" ;
_+"ó"=>sg+"òî" ;
_+"å"=>sg+"òî" ;
_+"è"=>sg+"òî" ;
s+"é"=>s +"ÿò" ;
_+("úð")
=>sg +"úò" ;
_+("òåë"|"àð"|"ÿð"|"äåí"
|"ïúò"|"îãúí"|"ñúí"
|"êîí"|"êðàë"|"öàð"
|"çåò"|"ëàêúò"|"íîêúò")
=>sg+"ÿò" ;
_+"а"=>sg+"та" ;
_+"я"=>sg+"та" ;
_+"о"=>sg+"то" ;
_+"у"=>sg+"то" ;
_+"е"=>sg+"то" ;
_+"и"=>sg+"то" ;
s+"й"=>s +"ят" ;
_+("ър")
=>sg +"ът" ;
_+("тел"|"ар"|"яр"|"ден"
|"път"|"огън"|"сън"
|"кон"|"крал"|"цар"
|"зет"|"лакът"|"нокът")
=>sg+"ят" ;
_ =>case g of {
AFem => sg+"òà" ;
_ => sg+"úò"
AFem => sg+"та" ;
_ => sg+"ът"
}
} ;
NFPlCount => count ;

View File

@@ -1,4 +1,4 @@
--# -coding=cp1251
--# -coding=utf8
--# -path=.:../abstract:../../prelude:../common
resource MorphoFunsBul = open
@@ -6,7 +6,7 @@ resource MorphoFunsBul = open
CatBul,
MorphoBul
in {
flags coding=cp1251 ;
flags coding=utf8 ;
oper
@@ -57,11 +57,11 @@ oper
dualV : VTable -> VTable -> V ;
dualV imperf perf = {
s = table {Imperf=>imperf; Perf=>perf};
n = let v0 = init (imperf ! (VImperfect Sg P1)) + "í"
in (mkNoun (v0+"å")
(v0+"èÿ")
(v0+"èÿ")
(v0+"å")
n = let v0 = init (imperf ! (VImperfect Sg P1)) + "н"
in (mkNoun (v0+"е")
(v0+"ия")
(v0+"ия")
(v0+"е")
ANeut).s;
vtype = VNormal;
lock_V=<>
@@ -72,11 +72,11 @@ oper
singleV : VTable -> V ;
singleV vtable = {
s = \\_=>vtable;
n = let v0 = init (vtable ! (VImperfect Sg P1)) + "í"
in (mkNoun (v0+"å")
(v0+"èÿ")
(v0+"èÿ")
(v0+"å")
n = let v0 = init (vtable ! (VImperfect Sg P1)) + "н"
in (mkNoun (v0+"е")
(v0+"ия")
(v0+"ия")
(v0+"е")
ANeut).s;
vtype = VNormal;
lock_V=<>
@@ -136,6 +136,9 @@ oper
mkV2V : V -> Prep -> Prep -> V2V ;
mkV2V v p t = prepV2 v p ** {c3 = t ; subjCtrl = False ; lock_V2V = <>} ;
imperfV2V : V -> VV ;
imperfV2V v = v ** {typ = VVInf Imperf; lock_VV = <>} ;
subjCtrlV2V : V -> Prep -> Prep -> V2V ;
subjCtrlV2V v p t = prepV2 v p ** {c3 = t ; subjCtrl = True ; lock_V2V = <>} ;
@@ -198,9 +201,9 @@ oper
compoundN = overload {
compoundN : Str -> N -> N
= \s,n -> {s = \\nform => s ++ n.s ! nform ; rel = \\aform => s ++ n.rel ! aform; relPost = True; g=n.g ; anim=n.anim ; lock_N = <>} ;
= \s,n -> {s = \\nform => s ++ n.s ! nform ; rel = \\aform => s ++ n.rel ! aform; relType = AdvMod; g=n.g ; anim=n.anim ; lock_N = <>} ;
compoundN : N -> Str -> N
= \n,s -> {s = \\nform => n.s ! nform ++ s; rel = \\aform => n.rel ! aform ++ s; relPost = True; g=n.g ; anim=n.anim ; lock_N = <>} ;
= \n,s -> {s = \\nform => n.s ! nform ++ s; rel = \\aform => n.rel ! aform ++ s; relType = AdvMod; g=n.g ; anim=n.anim ; lock_N = <>} ;
compoundN : N -> N -> N
= \n1,n2 -> lin N
{s = table {
@@ -209,14 +212,14 @@ oper
NFPlCount => n1.s ! NFPlCount ++ n2.s ! (NF Pl Indef) ;
NFVocative => n1.s ! NFVocative ++ n2.s ! (NF Sg Indef)
} ;
rel = \\aform => n1.rel ! aform; relPost = True;
rel = \\aform => n1.rel ! aform; relType = AdvMod;
g = n1.g
} ;
compoundN : A -> N -> N
= \a,n -> lin N
{s = \\nf => (a.s ! nform2aform nf n.g) ++ (n.s ! (indefNForm nf)) ;
rel = \\aform => a.s ! aform ++ n.rel ! indefAForm aform ;
relPost = False ;
relType = AdjMod ;
g = n.g
} ;
} ;
@@ -224,7 +227,7 @@ oper
dualN = overload {
dualN : N -> A -> N
= \n,a -> lin N { s = n.s;
rel = a.s; relPost = False;
rel = a.s; relType = AdjMod;
g = n.g
} ;
@@ -232,14 +235,14 @@ oper
= \n,p -> lin N { s = n.s;
rel = \\_ => linPrep p ++
n.s ! NF Sg Def ;
relPost = True;
relType = AdvMod;
g = n.g
} ;
dualN : N -> Str -> N
= \n,adv -> lin N { s = n.s;
rel = \\_ => adv ;
relPost = True;
relType = AdvMod;
g = n.g
}
@@ -250,7 +253,7 @@ oper
substantiveN : A -> AGender -> N;
substantiveN a g = lin N {
s = \\nform => a.s ! nform2aform nform g;
rel = a.s; relPost = False;
rel = a.s; relType = AdjMod;
g = g
} ;
@@ -283,5 +286,5 @@ oper
--
mkIAdv : Str -> IAdv ;
mkIAdv s = {s = table {QDir=>s;QIndir=>s+"òî"}; lock_IAdv = <>} ;
mkIAdv s = {s = table {QDir=>s;QIndir=>s+"то"}; lock_IAdv = <>} ;
}

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
flags optimize=all_subs ; coding=cp1251 ;
flags optimize=all_subs ; coding=utf8 ;
lin
DetCN det cn =
@@ -123,17 +123,17 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
AdNum adn num = {s = \\gspec => adn.s ++ num.s ! gspec; nn = num.nn} ;
OrdSuperl a = {s = \\aform => "íàé" ++ hyphen ++ a.s ! aform} ;
OrdSuperl a = {s = \\aform => "най" ++ hyphen ++ a.s ! aform} ;
DefArt = {
s = table {
True => \\_ => [] ;
False => table {
ASg Masc _ => "òîé" ;
ASgMascDefNom => "òîé" ;
ASg Fem _ => "òÿ" ;
ASg Neut _ => "òî" ;
APl _ => "òå"
ASg Masc _ => "той" ;
ASgMascDefNom => "той" ;
ASg Fem _ => "тя" ;
ASg Neut _ => "то" ;
APl _ => "те"
}
} ;
nonEmpty = False ;
@@ -145,11 +145,11 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
s = table {
True => \\_ => [] ;
False => table {
ASg Masc _ => "åäèí" ;
ASgMascDefNom => "åäèí" ;
ASg Fem _ => "åäíà" ;
ASg Neut _ => "åäíî" ;
APl _ => "åäíè"
ASg Masc _ => "един" ;
ASgMascDefNom => "един" ;
ASg Fem _ => "една" ;
ASg Neut _ => "едно" ;
APl _ => "едни"
}
} ;
nonEmpty = False ;
@@ -171,10 +171,10 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
UseN2 noun = noun ;
ComplN2 f x = {s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! RObj f.c2.c; g=f.g} ;
ComplN3 f x = {s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! RObj f.c2.c; rel = \\af => f.rel ! af ++ f.c2.s ++ x.s ! RObj f.c2.c; relPost = True; c2 = f.c3; g=f.g} ;
ComplN3 f x = {s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! RObj f.c2.c; rel = \\af => f.rel ! af ++ f.c2.s ++ x.s ! RObj f.c2.c; relType = AdvMod; c2 = f.c3; g=f.g} ;
Use2N3 f = {s = f.s ; rel = f.rel ; relPost = f.relPost ; g=f.g ; c2 = f.c2} ;
Use3N3 f = {s = f.s ; rel = f.rel ; relPost = f.relPost ; g=f.g ; c2 = f.c3} ;
Use2N3 f = {s = f.s ; rel = f.rel ; relType = f.relType ; g=f.g ; c2 = f.c2} ;
Use3N3 f = {s = f.s ; rel = f.rel ; relType = f.relType ; g=f.g ; c2 = f.c3} ;
AdjCN ap cn = {
@@ -193,13 +193,13 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
g = cn.g
} ;
SentCN cn sc = {s = \\nf => cn.s ! nf ++ sc.s ! agrP3 (gennum cn.g (numNForm nf)); g=cn.g} ;
SentCN cn sc = {s = \\nf => cn.s ! nf ++ sc.s; g=cn.g} ;
ApposCN cn np = {s = \\nf => cn.s ! nf ++ np.s ! RSubj; g=cn.g} ;
PossNP cn np = {s = \\nf => cn.s ! nf ++ "íà" ++ np.s ! (RObj CPrep); g = cn.g} ;
PossNP cn np = {s = \\nf => cn.s ! nf ++ "на" ++ np.s ! (RObj CPrep); g = cn.g} ;
PartNP cn np = {s = \\nf => cn.s ! nf ++ "îò" ++ np.s ! (RObj CPrep); g = cn.g} ;
PartNP cn np = {s = \\nf => cn.s ! nf ++ "от" ++ np.s ! (RObj CPrep); g = cn.g} ;
CountNP det np = {
s = \\role => let g = case np.gn of { -- this is lossy

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete NumeralBul of Numeral = CatBul [Numeral,Digits] ** open Prelude, ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
lincat
@@ -11,43 +11,43 @@ lincat
Sub1000000 = {s : CardOrd => NumF => Str; n : Number} ;
lin num x = {s = \\c => x.s ! c ! Formal; n=x.n} ;
lin n2 = mkDigit "äâà" "äâàìà" "äâå" "âòîðè" "äâàéñåò" "äâåñòà" "äâåñòàòà" ;
lin n3 = mkDigit "òðè" "òðèìà" "òðè" "òðåòè" "òðèéñåò" "òðèñòà" "òðèñòàòà" ;
lin n4 = mkDigit "÷åòèðè" "÷åòèðèìà" "÷åòèðè" "÷åòâúðòè" "÷åòèðèéñåò" "÷åòèðèñòîòèí" "÷åòèðèñòîòèíòå" ;
lin n5 = mkDigit "ïåò" "ïåòèìà" "ïåò" "ïåòè" "ïåòäåñåò" "ïåòñòîòèí" "ïåòñòîòèíòå" ;
lin n6 = mkDigit "øåñò" "øåñòèìà" "øåñò" "øåñòè" "øåéñåò" "øåñòñòîòèí" "øåñòñòîòèíòå" ;
lin n7 = mkDigit "ñåäåì" "ñåäìèíà" "ñåäåì" "ñåäìè" "ñåäåìäåñåò" "ñåäåìñòîòèí" "ñåäåìñòîòèíòå" ;
lin n8 = mkDigit "îñåì" "îñìèíà" "îñåì" "îñìè" "îñåìäåñåò" "îñåìñòîòèí" "îñåìñòîòèíòå" ;
lin n9 = mkDigit "äåâåò" "äåâåòèìà" "äåâåò" "äåâåòè" "äåâåòäåñåò" "äåâåòñòîòèí" "äåâåòñòîòèíòå" ;
lin n2 = mkDigit "два" "двама" "две" "втори" "двайсет" "двеста" "двестата" ;
lin n3 = mkDigit "три" "трима" "три" "трети" "трийсет" "триста" "тристата" ;
lin n4 = mkDigit "четири" "четирима" "четири" "четвърти" "четирийсет" "четиристотин" "четиристотинте" ;
lin n5 = mkDigit "пет" "петима" "пет" "пети" "петдесет" "петстотин" "петстотинте" ;
lin n6 = mkDigit "шест" "шестима" "шест" "шести" "шейсет" "шестстотин" "шестстотинте" ;
lin n7 = mkDigit "седем" "седмина" "седем" "седми" "седемдесет" "седемстотин" "седемстотинте" ;
lin n8 = mkDigit "осем" "осмина" "осем" "осми" "осемдесет" "осемстотин" "осемстотинте" ;
lin n9 = mkDigit "девет" "деветима" "девет" "девети" "деветдесет" "деветстотин" "деветстотинте" ;
lin pot01 =
{s = table {
unit => table {
NCard (CFMasc Indef _) => "åäèí" ;
NCard (CFMasc Def _) => "åäèíèÿ" ;
NCard (CFMascDefNom _) => "åäèíèÿò" ;
NCard (CFFem Indef) => "åäíà" ;
NCard (CFFem Def) => "åäíàòà" ;
NCard (CFNeut Indef) => "åäíî" ;
NCard (CFNeut Def) => "åäíîòî" ;
NCard (CFMasc Indef _) => "един" ;
NCard (CFMasc Def _) => "единия" ;
NCard (CFMascDefNom _) => "единият" ;
NCard (CFFem Indef) => "една" ;
NCard (CFFem Def) => "едната" ;
NCard (CFNeut Indef) => "едно" ;
NCard (CFNeut Def) => "едното" ;
NOrd aform => case aform of {
ASg Masc Indef => "ïúðâè" ;
ASg Masc Def => "ïúðâèÿ" ;
ASgMascDefNom => "ïúðâèÿò" ;
ASg Fem Indef => "ïúðâà" ;
ASg Fem Def => "ïúðâàòà" ;
ASg Neut Indef => "ïúðâî" ;
ASg Neut Def => "ïúðâîòî" ;
APl Indef => "ïúðâè" ;
APl Def => "ïúðâèòå"
ASg Masc Indef => "първи" ;
ASg Masc Def => "първия" ;
ASgMascDefNom => "първият" ;
ASg Fem Indef => "първа" ;
ASg Fem Def => "първата" ;
ASg Neut Indef => "първо" ;
ASg Neut Def => "първото" ;
APl Indef => "първи" ;
APl Def => "първите"
}
} ;
teen nf => case nf of {
Formal => mkCardOrd "åäèíàäåñåò" "åäèíàäåñåòèìà" "åäèíàäåñåò" "åäèíàäåñåòè" ;
Informal => mkCardOrd "åäèíàéñåò" "åäèíàéñåò" "åäèíàéñåò" "åäèíàéñòè"
Formal => mkCardOrd "единадесет" "единадесетима" "единадесет" "единадесети" ;
Informal => mkCardOrd "единайсет" "единайсет" "единайсет" "единайсти"
} ;
ten nf => mkCardOrd "äåñåò" "äåñåòèìà" "äåñåò" "äåñåòè" ;
hundred => mkCardOrd100 "ñòî" "ñòîòå" "ñòîòåí"
ten nf => mkCardOrd "десет" "десетима" "десет" "десети" ;
hundred => mkCardOrd100 "сто" "стоте" "стотен"
}
;n = Sg
} ;
@@ -59,12 +59,12 @@ lin pot1to19 d = {s = \\c,nf => d.s ! teen nf ! c; n = Pl; i = True} ;
lin pot0as1 n = {s = \\c,nf => n.s ! unit ! c; n = n.n; i = True} ;
lin pot1 d = {s = \\c,nf => d.s ! ten nf ! c; n = Pl; i = True} ;
lin pot1plus d e = {
s = \\c,nf => d.s ! ten nf ! NCard (CFMasc Indef NonHuman) ++ "è" ++ e.s ! unit ! c ; n = Pl; i = False} ;
s = \\c,nf => d.s ! ten nf ! NCard (CFMasc Indef NonHuman) ++ "и" ++ e.s ! unit ! c ; n = Pl; i = False} ;
lin pot1as2 n = n ;
lin pot2 n = {s = \\c,nf => n.s ! hundred ! c; n = Pl; i = True} ;
lin pot2plus d e = {
s = \\c,nf => d.s ! hundred ! NCard (CFMasc Indef NonHuman) ++ case e.i of {False => []; True => "è"} ++ e.s ! c ! nf ;
s = \\c,nf => d.s ! hundred ! NCard (CFMasc Indef NonHuman) ++ case e.i of {False => []; True => "и"} ++ e.s ! c ! nf ;
n = Pl ;
i = False
} ;
@@ -72,17 +72,17 @@ lin pot2plus d e = {
lin pot2as3 n = n ;
lin pot3 n = {
s = \\c,nf => case n.n of {
Sg => mkCardOrd100 "õèëÿäà" "õèëÿäàòà" "õèëÿäåí" ! c ;
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "õèëÿäè" "õèëÿäèòå" "õèëÿäåí" ! c
Sg => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! c ;
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "хиляди" "хилядите" "хиляден" ! c
} ;
n = Pl
} ;
lin pot3plus n m = {
s = \\c,nf => case n.n of {
Sg => mkCardOrd100 "õèëÿäà" "õèëÿäàòà" "õèëÿäåí" ! NCard (CFMasc Indef NonHuman) ;
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "õèëÿäè" "õèëÿäèòå" "õèëÿäåí" ! NCard (CFMasc Indef NonHuman)
Sg => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! NCard (CFMasc Indef NonHuman) ;
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "хиляди" "хилядите" "хиляден" ! NCard (CFMasc Indef NonHuman)
}
++ case m.i of {False => []; True => "è"} ++ m.s ! c ! nf ;
++ case m.i of {False => []; True => "и"} ++ m.s ! c ! nf ;
n = Pl
} ;
@@ -101,16 +101,16 @@ lin pot3plus n m = {
tail = inc i.tail
} ;
D_0 = mk3Dig "0" "0" "0åâ" Pl ;
D_1 = mk3Dig "1" "1" "1âè" Sg ;
D_2 = mk2Dig "2" "2ðè" ;
D_0 = mk3Dig "0" "0" "0ев" Pl ;
D_1 = mk3Dig "1" "1" "1ви" Sg ;
D_2 = mk2Dig "2" "2ри" ;
D_3 = mkDig "3" ;
D_4 = mkDig "4" ;
D_5 = mkDig "5" ;
D_6 = mkDig "6" ;
D_7 = mk3Dig "7" "7íà" "7ìè" Pl ;
D_8 = mk3Dig "8" "8íà" "8ìè" Pl ;
D_9 = mk3Dig "9" "9èìà" "9òè" Pl ;
D_7 = mk3Dig "7" "7на" "7ми" Pl ;
D_8 = mk3Dig "8" "8на" "8ми" Pl ;
D_9 = mk3Dig "9" "9има" "9ти" Pl ;
oper
spaceIf : DTail -> Str = \t -> case t of {
@@ -124,8 +124,8 @@ lin pot3plus n m = {
T3 => T1
} ;
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c (c+"ìà") o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "òè") ;
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c (c+"ма") o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "ти") ;
mk3Dig : Str -> Str -> Str -> Number -> TDigit = \c1,c2,o,n -> {
s = mkCardOrd c1 c2 c1 o ;

File diff suppressed because it is too large Load Diff

View File

@@ -1,165 +0,0 @@
--# -path=alltenses:../english:../translator:../abstract
concrete ParseBul of ParseEngAbs =
TenseX - [IAdv, CAdv],
CatBul,
NounBul - [PPartNP],
AdjectiveBul,
NumeralBul,
SymbolBul [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
ConjunctionBul,
VerbBul - [SlashV2V, PassV2, UseCopula, ComplVV],
AdverbBul,
PhraseBul,
SentenceBul,
QuestionBul,
RelativeBul,
IdiomBul [NP, VP, Tense, Cl, ProgrVP, ExistNP],
ExtraBul [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash,
Temp, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ComplSlashPartLast,
ClSlash, RCl, EmptyRelSlash],
DocumentationBul,
DictionaryBul **
open ResBul, Prelude in {
flags
literal=Symb ;
coding = utf8 ;
lin
CompoundCN num noun cn = {
s = \\nf => num.s ! CFNeut Indef ++ (noun.rel ! nform2aform nf cn.g) ++ (cn.s ! (indefNForm nf)) ;
g = cn.g
} ;
GerundN v = {
s = \\nform => v.s ! Imperf ! VNoun nform ;
rel = \\aform => v.s ! Imperf ! VPresPart aform ++
case v.vtype of {
VMedial c => reflClitics ! c;
_ => []
};
g = ANeut
} ;
GerundAP v = {
s = \\aform => v.s ! Imperf ! VPresPart aform ++
case v.vtype of {
VMedial c => reflClitics ! c;
_ => []
};
adv = v.s ! Imperf ! VPresPart (ASg Neut Indef);
isPre = True
} ;
PastPartAP v = {
s = \\aform => v.s ! Perf ! VPassive aform ;
adv = v.s ! Perf ! VPassive (ASg Neut Indef);
isPre = True
} ;
PositAdVAdj a = {s = a.adv} ;
that_RP = {
s = whichRP
} ;
UseQuantPN q pn = { s = table {
RObj Dat => "на" ++ pn.s;
_ => pn.s
} ;
a = {gn = GSg pn.g; p = P3};
p = q.p
} ;
PastPartRS ant pol vp = {
s = \\agr =>
ant.s ++ pol.s ++
vp.ad.s ++
case pol.p of {Pos => ""; Neg => "не"} ++
case ant.a of {Simul => ""; Anter => auxBe ! VPerfect (aform agr.gn Indef (RObj Acc))} ++
vp.s ! Perf ! VPassive (aform agr.gn Indef (RObj Acc)) ++
case vp.vtype of {
VMedial c => reflClitics ! c;
_ => []
} ++
vp.compl1 ! agr ++ vp.compl2 ! agr ;
} ;
PresPartRS ant pol vp = {
s = \\agr =>
ant.s ++ pol.s ++
vp.ad.s ++
case pol.p of {Pos => ""; Neg => "не"} ++
case ant.a of {Simul => ""; Anter => auxBe ! VPerfect (aform agr.gn Indef (RObj Acc))} ++
vp.s ! Imperf ! VPresPart (aform agr.gn Indef (RObj Acc)) ++
case vp.vtype of {
VMedial c => reflClitics ! c;
_ => []
} ++
vp.compl ! agr ;
} ;
SlashV2V vv ant p vp =
insertSlashObj2 (\\agr => ant.s ++ p.s ++ vv.c3.s ++
daComplex ant.a (orPol p.p vp.p) vp ! Perf ! agr)
Pos
(slashV vv vv.c2) ;
ComplVV vv ant p vp =
insertObj (\\agr => ant.s ++ p.s ++
case vv.typ of {
VVInf => daComplex ant.a p.p vp ! Perf ! agr;
VVGerund => gerund vp ! Imperf ! agr
}) vp.p
(predV vv) ;
PredVPosv np vp = {
s = \\t,a,p,o =>
let
subj = np.s ! (case vp.vtype of {
VNormal => RSubj ;
VMedial _ => RSubj ;
VPhrasal c => RObj c}) ;
verb : Bool => Str
= \\q => vpTenses vp ! t ! a ! p ! np.a ! q ! Perf ;
compl = vp.compl ! np.a
in case o of {
Main => compl ++ subj ++ verb ! False ;
Inv => verb ! False ++ compl ++ subj ;
Quest => compl ++ subj ++ verb ! True
}
} ;
CompS s = {s = \\_ => "че" ++ s.s; p = Pos} ;
CompQS qs = {s = \\_ => qs.s ! QIndir; p = Pos} ;
CompVP ant p vp = {s = let p' = case vp.p of {
Neg => Neg;
Pos => p.p
}
in \\agr => ant.s ++ p.s ++
daComplex ant.a p' vp ! Perf ! agr;
p = Pos
} ;
VPSlashVS vs vp =
let vp = insertObj (daComplex Simul Pos vp ! Perf) vp.p (predV vs)
in { s = vp.s;
ad = vp.ad;
compl1 = \\_ => "";
compl2 = vp.compl;
vtype = vp.vtype;
p = vp.p;
c2 = {s=""; c=Acc}
} ;
ApposNP np1 np2 = {
s = \\role => np1.s ! role ++ comma ++ np2.s ! RSubj ;
a = np1.a ;
p = np1.p
} ;
UttAdV adv = adv;
}

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
lin

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
@@ -12,7 +12,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
let cls = cl.s ! t ! a ! p
in table {
QDir => cls ! Quest ;
QIndir => "àêî" ++ cls ! Main
QIndir => "ако" ++ cls ! Main
} ---- "whether" in ExtEng
} ;
@@ -22,7 +22,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
} ;
QuestSlash ip slash =
mkQuestion {s = \\qform => slash.c2.s ++ case slash.c2.c of {Dat=>"íà";_=>[]} ++ ip.s ! (RObj slash.c2.c) ! qform}
mkQuestion {s = \\qform => slash.c2.s ++ case slash.c2.c of {Dat=>"на";_=>[]} ++ ip.s ! (RObj slash.c2.c) ! qform}
{s = slash.s ! (agrP3 ip.gn) } ;
QuestIAdv iadv cl = mkQuestion iadv cl ;
@@ -30,7 +30,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
QuestIComp icomp np =
mkQuestion icomp (mkClause (np.s ! RSubj) np.gn np.p (predV verbBe)) ;
PrepIP p ip = {s = \\qform => p.s ++ case p.c of {Dat=>"íà";_=>[]} ++ ip.s ! RSubj ! qform} ;
PrepIP p ip = {s = \\qform => p.s ++ case p.c of {Dat=>"на";_=>[]} ++ ip.s ! RSubj ! qform} ;
AdvIP ip adv = {
s = \\role,qform => ip.s ! role ! qform ++ adv.s ;

View File

@@ -1,13 +1,13 @@
--# -coding=cp1251
--# -coding=utf8
concrete RelativeBul of Relative = CatBul ** open ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
lin
RelCl cl = {
s = \\t,a,p,agr => suchRP ! agr.gn ++ "֌" ++ cl.s ! t ! a ! p ! Main
s = \\t,a,p,agr => suchRP ! agr.gn ++ "че" ++ cl.s ! t ! a ! p ! Main
} ;
RelVP rp vp = {

View File

@@ -1,5 +1,5 @@
--# -path=.:../abstract:../common:../../prelude
--# -coding=cp1251
--# -coding=utf8
--1 Bulgarian auxiliary operations.
@@ -11,7 +11,7 @@
resource ResBul = ParamX ** open Prelude, Predef in {
flags
coding=cp1251 ; optimize=all ;
coding=utf8 ; optimize=all ;
-- Some parameters, such as $Number$, are inherited from $ParamX$.
@@ -30,7 +30,9 @@ resource ResBul = ParamX ** open Prelude, Predef in {
| NFPlCount
| NFVocative
;
NRelType = Pref | AdjMod | AdvMod ;
NNumber =
NNum Number
| NCountable
@@ -326,149 +328,149 @@ resource ResBul = ParamX ** open Prelude, Predef in {
auxBe : VTable =
table {
VPres Sg P1 => "ñúì" ;
VPres Sg P2 => "ñè" ;
VPres Sg P3 => "å" ;
VPres Pl P1 => "ñìå" ;
VPres Pl P2 => "ñòå" ;
VPres Pl P3 => "ñà" ;
VAorist Sg P1 => "áÿõ" ;
VAorist Sg _ => "áåøå" ;
VAorist Pl P1 => "áÿõìå" ;
VAorist Pl P2 => "áÿõòå" ;
VAorist Pl P3 => "áÿõà" ;
VImperfect Sg P1 => "áÿõ" ;
VImperfect Sg _ => "áåøå" ;
VImperfect Pl P1 => "áÿõìå" ;
VImperfect Pl P2 => "áÿõòå" ;
VImperfect Pl P3 => "áÿõà" ;
VPerfect aform => regAdjective "áèë" ! aform ;
VPluPerfect aform => regAdjective "áèë" ! aform ;
VPassive aform => regAdjective "áúäåí" ! aform ;
VPresPart aform => regAdjective "áúäåù" ! aform ;
VImperative Sg => "áúäè" ;
VImperative Pl => "áúäåòå" ;
VNoun _ => "áúäåíå";
VGerund => "áèäåéêè"
VPres Sg P1 => "съм" ;
VPres Sg P2 => "си" ;
VPres Sg P3 => "е" ;
VPres Pl P1 => "сме" ;
VPres Pl P2 => "сте" ;
VPres Pl P3 => "са" ;
VAorist Sg P1 => "бях" ;
VAorist Sg _ => "беше" ;
VAorist Pl P1 => "бяхме" ;
VAorist Pl P2 => "бяхте" ;
VAorist Pl P3 => "бяха" ;
VImperfect Sg P1 => "бях" ;
VImperfect Sg _ => "беше" ;
VImperfect Pl P1 => "бяхме" ;
VImperfect Pl P2 => "бяхте" ;
VImperfect Pl P3 => "бяха" ;
VPerfect aform => regAdjective "бил" ! aform ;
VPluPerfect aform => regAdjective "бил" ! aform ;
VPassive aform => regAdjective "бъден" ! aform ;
VPresPart aform => regAdjective "бъдещ" ! aform ;
VImperative Sg => "бъди" ;
VImperative Pl => "бъдете" ;
VNoun _ => "бъдене";
VGerund => "бидейки"
} ;
auxWould : VTable =
table {
VPres Sg P1 => "áúäà" ;
VPres Sg P2 => "áúäåø" ;
VPres Sg P3 => "áúäå" ;
VPres Pl P1 => "áúäåì" ;
VPres Pl P2 => "áúäåòå" ;
VPres Pl P3 => "áúäàò" ;
VAorist Sg P1 => "áÿõ" ;
VAorist Sg _ => "áåøå" ;
VAorist Pl P1 => "áÿõìå" ;
VAorist Pl P2 => "áÿõòå" ;
VAorist Pl P3 => "áÿõà" ;
VImperfect Sg P1 => "áúäåõ" ;
VImperfect Sg _ => "áúäåøå" ;
VImperfect Pl P1 => "áúäåõìå" ;
VImperfect Pl P2 => "áúäåõòå" ;
VImperfect Pl P3 => "áúäåõà" ;
VPerfect aform => regAdjective "áèë" ! aform ;
VPluPerfect aform => regAdjective "áúäåë" ! aform ;
VPassive aform => regAdjective "áúäåí" ! aform ;
VPresPart aform => regAdjective "áúäåù" ! aform ;
VImperative Sg => "áúäè" ;
VImperative Pl => "áúäåòå" ;
VNoun _ => "áúäåíå";
VGerund => "áúäåéêè"
VPres Sg P1 => "бъда" ;
VPres Sg P2 => "бъдеш" ;
VPres Sg P3 => "бъде" ;
VPres Pl P1 => "бъдем" ;
VPres Pl P2 => "бъдете" ;
VPres Pl P3 => "бъдат" ;
VAorist Sg P1 => "бях" ;
VAorist Sg _ => "беше" ;
VAorist Pl P1 => "бяхме" ;
VAorist Pl P2 => "бяхте" ;
VAorist Pl P3 => "бяха" ;
VImperfect Sg P1 => "бъдех" ;
VImperfect Sg _ => "бъдеше" ;
VImperfect Pl P1 => "бъдехме" ;
VImperfect Pl P2 => "бъдехте" ;
VImperfect Pl P3 => "бъдеха" ;
VPerfect aform => regAdjective "бил" ! aform ;
VPluPerfect aform => regAdjective "бъдел" ! aform ;
VPassive aform => regAdjective "бъден" ! aform ;
VPresPart aform => regAdjective "бъдещ" ! aform ;
VImperative Sg => "бъди" ;
VImperative Pl => "бъдете" ;
VNoun _ => "бъдене";
VGerund => "бъдейки"
} ;
auxCond : Number => Person => Str =
table {
Sg => table {
P1 => "áèõ" ;
_ => "áè"
P1 => "бих" ;
_ => "би"
} ;
Pl => table {
P1 => "áèõìå" ;
P2 => "áèõòå" ;
P3 => "áèõà"
P1 => "бихме" ;
P2 => "бихте" ;
P3 => "биха"
}
} ;
verbBe : Verb = {s=table Aspect [auxBe; auxWould] ; vtype=VNormal} ;
reflClitics : Case => Str = table {Acc => "ñå"; Dat => "ñè"; WithPrep => with_Word ++ "ñåáå ñè"; CPrep => "ñåáå ñè"} ;
reflClitics : Case => Str = table {Acc => "се"; Dat => "си"; WithPrep => with_Word ++ "себе си"; CPrep => "себе си"} ;
personalClitics : Agr -> Case => Str = \agr ->
table {
Acc => case agr.gn of {
GSg g => case agr.p of {
P1 => "ìå" ;
P2 => "òå" ;
P1 => "ме" ;
P2 => "те" ;
P3 => case g of {
Masc => "ãî" ;
Fem => "ÿ" ;
Neut => "ãî"
Masc => "го" ;
Fem => "я" ;
Neut => "го"
}
} ;
GPl => case agr.p of {
P1 => "íè" ;
P2 => "âè" ;
P3 => "ãè"
P1 => "ни" ;
P2 => "ви" ;
P3 => "ги"
}
} ;
Dat => case agr.gn of {
GSg g => case agr.p of {
P1 => "ìè" ;
P2 => "òè" ;
P1 => "ми" ;
P2 => "ти" ;
P3 => case g of {
Masc => "ìó" ;
Fem => "é" ;
Neut => "ìó"
Masc => "му" ;
Fem => "й" ;
Neut => "му"
}
} ;
GPl => case agr.p of {
P1 => "íè" ;
P2 => "âè" ;
P3 => "èì"
P1 => "ни" ;
P2 => "ви" ;
P3 => "им"
}
} ;
WithPrep => case agr.gn of {
GSg g => case agr.p of {
P1 => with_Word ++ "ìåí" ;
P2 => with_Word ++ "òåá" ;
P1 => with_Word ++ "мен" ;
P2 => with_Word ++ "теб" ;
P3 => case g of {
Masc => with_Word ++ "íåãî" ;
Fem => with_Word ++ "íåÿ" ;
Neut => with_Word ++ "íåãî"
Masc => with_Word ++ "него" ;
Fem => with_Word ++ "нея" ;
Neut => with_Word ++ "него"
}
} ;
GPl => case agr.p of {
P1 => with_Word ++ "íàñ" ;
P2 => with_Word ++ "âàñ" ;
P3 => with_Word ++ "òÿõ"
P1 => with_Word ++ "нас" ;
P2 => with_Word ++ "вас" ;
P3 => with_Word ++ "тях"
}
} ;
CPrep => case agr.gn of {
GSg g => case agr.p of {
P1 => "ìåí" ;
P2 => "òåá" ;
P1 => "мен" ;
P2 => "теб" ;
P3 => case g of {
Masc => "íåãî" ;
Fem => "íåÿ" ;
Neut => "íåãî"
Masc => "него" ;
Fem => "нея" ;
Neut => "него"
}
} ;
GPl => case agr.p of {
P1 => "íàñ" ;
P2 => "âàñ" ;
P3 => "òÿõ"
P1 => "нас" ;
P2 => "вас" ;
P3 => "тях"
}
}
} ;
ia2e : Str -> Str = -- to be used when the next syllable has vowel different from "à","ú","î" or "ó"
ia2e : Str -> Str = -- to be used when the next syllable has vowel different from "а","ъ","о" or "у"
\s -> case s of {
x@(_*+_) + "ÿ" + y@(("á"|"â"|"ã"|"ä"|"æ"|"ç"|"ê"|"ë"|"ì"|"í"|"ï"|"ð"|"ñ"|"ò"|"ô"|"õ"|"ö"|"÷"|"ø")*)
=> x+"å"+y;
x@(_*+_) + "я" + y@(("б"|"в"|"г"|"д"|"ж"|"з"|"к"|"л"|"м"|"н"|"п"|"р"|"с"|"т"|"ф"|"х"|"ц"|"ч"|"ш")*)
=> x+"е"+y;
_ => s
};
@@ -476,19 +478,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
\base ->
let base0 : Str
= case base of {
x+"è" => x;
x+"и" => x;
x => x
}
in table {
ASg Masc Indef => base ;
ASg Masc Def => (base0+"èÿ") ;
ASgMascDefNom => (base0+"èÿò") ;
ASg Fem Indef => (base0+"à") ;
ASg Fem Def => (base0+"aòa") ;
ASg Neut Indef => (base0+"î") ;
ASg Neut Def => (base0+"îòî") ;
APl Indef => (ia2e base0+"è") ;
APl Def => (ia2e base0+"èòå")
ASg Masc Def => (base0+"ия") ;
ASgMascDefNom => (base0+"ият") ;
ASg Fem Indef => (base0+"а") ;
ASg Fem Def => (base0+"ата") ;
ASg Neut Indef => (base0+"о") ;
ASg Neut Def => (base0+"ото") ;
APl Indef => (ia2e base0+"и") ;
APl Def => (ia2e base0+"ите")
};
-- For $Sentence$.
@@ -543,37 +545,37 @@ resource ResBul = ParamX ** open Prelude, Predef in {
_ => auxPres++s++clitic.s
} ;
li0 = case <verb.ad.isEmpty,q0> of {<False,True> => "ëè"; _ => []} ;
li0 = case <verb.ad.isEmpty,q0> of {<False,True> => "ли"; _ => []} ;
q = case verb.ad.isEmpty of {True => q0; False => False} ;
li = case q of {True => "ëè"; _ => []} ;
li = case q of {True => "ли"; _ => []} ;
vf1 : Str -> {s1 : Str; s2 : Str} = \s ->
case p of {
Pos => case q of {True => {s1=[]; s2="ëè"++apc []};
Pos => case q of {True => {s1=[]; s2="ли"++apc []};
False => {s1=apc []; s2=[]}} ;
Neg => {s1="íå"++apc li; s2=[]}
Neg => {s1="не"++apc li; s2=[]}
} ;
vf2 : Str -> {s1 : Str; s2 : Str} = \s ->
case p of {
Pos => case q of {True => {s1=[]; s2="ëè"++s};
Pos => case q of {True => {s1=[]; s2="ли"++s};
False => {s1=s; s2=[]}} ;
Neg => case verb.vtype of
{VNormal => {s1="íå"++s; s2=li} ;
_ => {s1="íå"++s++li; s2=[]}}
{VNormal => {s1="не"++s; s2=li} ;
_ => {s1="не"++s++li; s2=[]}}
} ;
vf3 : Str -> {s1 : Str; s2 : Str} = \s ->
case p of {
Pos => {s1="ùå"++s; s2=li} ;
Neg => {s1="íÿìà"++li++"äà"++s; s2=[]}
Pos => {s1="ще"++s; s2=li} ;
Neg => {s1="няма"++li++"да"++s; s2=[]}
} ;
vf4 : Str -> {s1 : Str; s2 : Str} = \s ->
case p of {
Pos => {s1= s++li++clitic.s; s2=[]} ;
Neg => {s1="íå"++s++li++clitic.s; s2=[]}
Neg => {s1="не"++s++li++clitic.s; s2=[]}
} ;
verbs : {aux:{s1:Str; s2:Str}; main:Str} =
@@ -598,8 +600,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
VPhrasal Dat => {s=personalClitics agr ! Dat++vp.clitics; agr={gn=GSg Neut; p=P3}} ;
VPhrasal c => {s=vp.clitics++personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
} ;
pol = case p of {Pos => ""; Neg => "íå"}
in vp.ad.s ++ "äà" ++ pol ++ clitic.s ++
pol = case p of {Pos => ""; Neg => "не"}
in vp.ad.s ++ "да" ++ pol ++ clitic.s ++
case a of {
Simul => vp.s ! asp ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ;
Anter => auxBe ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++
@@ -611,9 +613,14 @@ resource ResBul = ParamX ** open Prelude, Predef in {
\vp ->
let agr = {gn = GSg Neut; p = P1};
clitic = case vp.vtype of {
VNormal => {s=[]; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
VNormal => {s=vp.clitics; agr=agr} ;
VMedial c => {s=vp.clitics++reflClitics ! c; agr=agr} ;
VPhrasal c => {s=case c of {
Dat => personalClitics agr ! Dat++vp.clitics;
_ => vp.clitics++personalClitics agr ! c
};
agr={gn=GSg Neut; p=P3}
}
} ;
in vp.ad.s ++
vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++ clitic.s ++
@@ -622,10 +629,10 @@ resource ResBul = ParamX ** open Prelude, Predef in {
linCase : Case -> Polarity -> Str =
\c,p -> case c of {
Acc => "" ;
Dat => "íà" ;
Dat => "на" ;
WithPrep => case p of {
Pos => with_Word ;
Neg => "áåç"
Neg => "без"
} ;
CPrep => ""
} ;
@@ -649,17 +656,17 @@ resource ResBul = ParamX ** open Prelude, Predef in {
{s = table {
unit => mkCardOrd dva dvama dve vtori ;
teen nf => case nf of {
Formal => mkCardOrd (dva+"íàäåñåò") (dva+"íàäåñåòèìà") (dva+"íàäåñåò") (dva+"íàäåñåòè") ;
Informal => mkCardOrd (dva+"íàéñåò") (dva+"íàéñåò") (dva+"íàéñåò") (dva+"íàéñòè")
Formal => mkCardOrd (dva+"надесет") (dva+"надесетима") (dva+"надесет") (dva+"надесети") ;
Informal => mkCardOrd (dva+"найсет") (dva+"найсет") (dva+"найсет") (dva+"найсти")
} ;
ten nf => case nf of {
Formal => mkCardOrd (dva+"äåñåò") (dva+"äåñåòèìà") (dva+"äåñåò") (dva+"äåñåòè") ;
Informal => mkCardOrd dvaiset dvaiset dvaiset (dvaiset+"è")
Formal => mkCardOrd (dva+"десет") (dva+"десетима") (dva+"десет") (dva+"десети") ;
Informal => mkCardOrd dvaiset dvaiset dvaiset (dvaiset+"и")
} ;
hundred => let dvesten : Str
= case dvesta of {
dvest+"à" => dvest+"åí" ;
chetiristot+"èí" => chetiristot+"åí"
dvest+"а" => dvest+"ен" ;
chetiristot+"ин" => chetiristot+"ен"
}
in mkCardOrd100 dvesta dvestata dvesten
}
@@ -669,19 +676,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
\dva, dvama, dve, vtori ->
table {
NCard dg => digitGenderSpecies dva dvama dve ! dg ;
NOrd aform => let vtora : Str = case vtori of {_+"â" => vtori; _ => init vtori} + "à" ;
vtoro : Str = case vtori of {_+"â" => vtori; _ => init vtori} + "î";
i : Str = case vtori of {_+"â" => "è"; _ => ""}
NOrd aform => let vtora : Str = case vtori of {_+"в" => vtori; _ => init vtori} + "а" ;
vtoro : Str = case vtori of {_+"в" => vtori; _ => init vtori} + "о";
i : Str = case vtori of {_+"в" => "и"; _ => ""}
in case aform of {
ASg Masc Indef => vtori ;
ASg Masc Def => vtori+i+"ÿ" ;
ASgMascDefNom => vtori+i+"ÿò" ;
ASg Masc Def => vtori+i+"я" ;
ASgMascDefNom => vtori+i+"ят" ;
ASg Fem Indef => vtora ;
ASg Fem Def => vtora+"òà" ;
ASg Fem Def => vtora+"та" ;
ASg Neut Indef => vtoro ;
ASg Neut Def => vtoro+"òî" ;
ASg Neut Def => vtoro+"то" ;
APl Indef => vtori+i ;
APl Def => vtori+i+"òå"
APl Def => vtori+i+"те"
}
} ;
@@ -698,14 +705,14 @@ resource ResBul = ParamX ** open Prelude, Predef in {
NOrd aform => let stotn = init (init stoten) + last stoten ;
in case aform of {
ASg Masc Indef => stoten ;
ASg Masc Def => stotn+"èÿ" ;
ASgMascDefNom => stotn+"èÿò" ;
ASg Fem Indef => stotn+"à" ;
ASg Fem Def => stotn+"àòà" ;
ASg Neut Indef => stotn+"î" ;
ASg Neut Def => stotn+"îòî" ;
APl Indef => stotn+"è" ;
APl Def => stotn+"èòå"
ASg Masc Def => stotn+"ия" ;
ASgMascDefNom => stotn+"ият" ;
ASg Fem Indef => stotn+"а" ;
ASg Fem Def => stotn+"ата" ;
ASg Neut Indef => stotn+"о" ;
ASg Neut Def => stotn+"ото" ;
APl Indef => stotn+"и" ;
APl Def => stotn+"ите"
}
} ;
@@ -713,12 +720,12 @@ resource ResBul = ParamX ** open Prelude, Predef in {
\dva, dvama, dve
-> let addDef : Str -> Gender -> Str =
\s,g -> case s of {
dves+"òà" => dves+"òàòå" ;
dv+"à" => dv+"àòà" ;
"0" => s+"òà" ;
"1" => s+case g of {Masc => "ÿò"; Fem => "òà"; Neut => "òî"} ;
"2" => s+case g of {Masc => "òà"; _ => "òå"} ;
x => x+"òå"
dves+"та" => dves+"тате" ;
dv+"а" => dv+"ата" ;
"0" => s+"та" ;
"1" => s+case g of {Masc => "ят"; Fem => "та"; Neut => "то"} ;
"2" => s+case g of {Masc => "та"; _ => "те"} ;
x => x+"те"
}
in table {
CFMasc Indef NonHuman => dva ;
@@ -736,19 +743,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
mkIP : Str -> Str -> GenNum -> {s : Role => QForm => Str ; gn : GenNum} =
\koi,kogo,gn -> {
s = table {
RSubj => table QForm [koi; koi+"òî"] ;
RObj Acc => table QForm [kogo; kogo+"òî"] ;
RObj Dat => table QForm ["íà" ++ kogo; "íà" ++ kogo+"òî"] ;
RObj WithPrep => table QForm [with_Word ++ kogo; with_Word ++ kogo+"òî"] ;
RObj CPrep => table QForm [kogo; kogo+"òî"] ;
RVoc => table QForm [koi; koi+"òî"]
RSubj => table QForm [koi; koi+"то"] ;
RObj Acc => table QForm [kogo; kogo+"то"] ;
RObj Dat => table QForm ["на" ++ kogo; "на" ++ kogo+"то"] ;
RObj WithPrep => table QForm [with_Word ++ kogo; with_Word ++ kogo+"то"] ;
RObj CPrep => table QForm [kogo; kogo+"то"] ;
RVoc => table QForm [koi; koi+"то"]
} ;
gn = gn
} ;
with_Word : Str
= pre { "ñ" ;
"ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"}
= pre { "с" ;
"със" / strs {"с" ; "з" ; "С" ; "З"}
} ;
mkPron : (az,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite : Str) ->
@@ -805,43 +812,43 @@ resource ResBul = ParamX ** open Prelude, Predef in {
whichRP : GenNum => Str
= table {
GSg Masc => "êîéòî" ;
GSg Fem => "êîÿòî" ;
GSg Neut => "êîåòî" ;
GPl => "êîèòî"
GSg Masc => "който" ;
GSg Fem => "която" ;
GSg Neut => "което" ;
GPl => "които"
} ;
suchRP : GenNum => Str
= table {
GSg Masc => "òàêúâ" ;
GSg Fem => "òàêàâà" ;
GSg Neut => "òàêîâà" ;
GPl => "òàêèâà"
GSg Masc => "такъв" ;
GSg Fem => "такава" ;
GSg Neut => "такова" ;
GPl => "такива"
} ;
thisRP : GenNum => Str
= table {
GSg Masc => "òîçè" ;
GSg Fem => "òaçè" ;
GSg Neut => "òîâà" ;
GPl => "òåçè"
GSg Masc => "този" ;
GSg Fem => "тaзи" ;
GSg Neut => "това" ;
GPl => "тези"
} ;
linCoord : Str -> Ints 4 => Str ;
linCoord comma = table {0 => "è"; 1=>"èëè"; 2=>"íèòî"; 3=>comma; 4=>[]} ;
linCoord comma = table {0 => "и"; 1=>"или"; 2=>"нито"; 3=>comma; 4=>[]} ;
hyphen : Str = SOFT_BIND ++ "-" ++ SOFT_BIND ;
reflPron : AForm => Str =
table {
ASg Masc Indef => "ñâîé" ;
ASg Masc Def => "ñâîÿ" ;
ASgMascDefNom => "ñâîÿò" ;
ASg Fem Indef => "ñâîÿ" ;
ASg Fem Def => "ñâîÿòà" ;
ASg Neut Indef => "ñâîå" ;
ASg Neut Def => "ñâîåòî" ;
APl Indef => "ñâîè" ;
APl Def => "ñâîèòå"
ASg Masc Indef => "свой" ;
ASg Masc Def => "своя" ;
ASgMascDefNom => "своят" ;
ASg Fem Indef => "своя" ;
ASg Fem Def => "своята" ;
ASg Neut Indef => "свое" ;
ASg Neut Def => "своето" ;
APl Indef => "свои" ;
APl Def => "своите"
} ;
}

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
@@ -11,7 +11,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
VMedial _ => np.s ! RSubj ;
VPhrasal c => linCase c (personPol np.p) ++ np.s ! RObj CPrep}) np.gn np.p vp ;
PredSCVP sc vp = mkClause (sc.s ! {gn=GSg Masc; p=P3}) (GSg Masc) (NounP3 Pos) vp ;
PredSCVP sc vp = mkClause sc.s (GSg Masc) (NounP3 Pos) vp ;
ImpVP vp = {
s = \\p,gn =>
@@ -27,7 +27,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
}
in case orPol p vp.p of {
Pos => vp.ad.s ++ verb Perf ++ clitic ;
Neg => "íå" ++ vp.ad.s ++ clitic ++ verb Imperf
Neg => "не" ++ vp.ad.s ++ clitic ++ verb Imperf
} ++ compl ;
} ;
@@ -51,13 +51,13 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
SlashVS np vs slash = {
s = \\agr => (mkClause (np.s ! RSubj) np.gn np.p
(insertObj (\\_ => "֌" ++ slash.s ! agr) Pos (predV vs))).s ;
(insertObj (\\_ => "че" ++ slash.s ! agr) Pos (predV vs))).s ;
c2 = slash.c2
} ;
EmbedS s = {s = \\_ => "֌" ++ s.s} ;
EmbedQS qs = {s = \\_ => qs.s ! QIndir} ;
EmbedVP vp = {s = \\agr => daComplex Simul vp.p vp ! Perf ! agr} ;
EmbedS s = {s = "че" ++ s.s} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
EmbedVP vp = {s = daComplex Simul vp.p vp ! Perf ! agrP3 (GSg Masc)} ;
UseCl t p cl = {
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! Main

View File

@@ -1,132 +1,132 @@
--# -coding=cp1251
--# -coding=utf8
concrete StructuralBul of Structural = CatBul **
open MorphoBul, ParadigmsBul, Prelude, (X = ConstructX) in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all ;
lin
above_Prep = mkPrep "íàä" ;
after_Prep = mkPrep "ñëåä" ;
all_Predet = {s = table GenNum ["âñè÷êèÿ";"âñè÷êàòà";"âñè÷êîòî";"âñè÷êèòå"]} ;
almost_AdA, almost_AdN = ss "ïî÷òè" ;
at_least_AdN, at_most_AdN = ss "ïî÷òè" ; ---- AR
although_Subj = ss ["âúïðåêè ÷å"] ;
always_AdV = mkAdV "âèíàãè" ;
and_Conj = mkConj "è" Pl ;
because_Subj = ss "çàùîòî" ;
before_Prep = mkPrep "ïðåäè" ;
behind_Prep = mkPrep "çàä" ;
between_Prep = mkPrep "ìåæäó" ;
both7and_DConj = mkConj "è" Pl ** {sep=0} ;
but_PConj = ss "íî" ;
by8agent_Prep = mkPrep "÷ðåç" ;
by8means_Prep = mkPrep "÷ðåç" ;
can8know_VV, can_VV = mkVV (stateV (mkV166 "ìîãà")) ;
during_Prep = mkPrep ["ïî âðåìå íà"] ;
either7or_DConj = mkConj "èëè" Sg ** {sep=1} ;
everybody_NP = mkNP "âñåêè" (GSg Masc) (NounP3 Pos);
every_Det = mkDeterminerSg "âñåêè" "âñÿêà" "âñÿêî";
everything_NP = mkNP "âñè÷êî" (GSg Neut) (NounP3 Pos);
everywhere_Adv = ss "íàâñÿêúäå" ;
few_Det = {s = \\_,_,_ => "íÿêîëêî"; nn = NCountable; spec = Indef; p = Pos} ;
above_Prep = mkPrep "над" ;
after_Prep = mkPrep "след" ;
all_Predet = {s = table GenNum ["всичкия";"всичката";"всичкото";"всичките"]} ;
almost_AdA, almost_AdN = ss "почти" ;
at_least_AdN, at_most_AdN = ss "почти" ; ---- AR
although_Subj = ss ["въпреки че"] ;
always_AdV = mkAdV "винаги" ;
and_Conj = mkConj "и" Pl ;
because_Subj = ss "защото" ;
before_Prep = mkPrep "преди" ;
behind_Prep = mkPrep "зад" ;
between_Prep = mkPrep "между" ;
both7and_DConj = mkConj "и" Pl ** {sep=0} ;
but_PConj = ss "но" ;
by8agent_Prep = mkPrep "чрез" ;
by8means_Prep = mkPrep "чрез" ;
can8know_VV, can_VV = mkVV (stateV (mkV166 "мога")) ;
during_Prep = mkPrep ["по време на"] ;
either7or_DConj = mkConj "или" Sg ** {sep=1} ;
everybody_NP = mkNP "всеки" (GSg Masc) (NounP3 Pos);
every_Det = mkDeterminerSg "всеки" "всяка" "всяко";
everything_NP = mkNP "всичко" (GSg Neut) (NounP3 Pos);
everywhere_Adv = ss "навсякъде" ;
few_Det = {s = \\_,_,_ => "няколко"; nn = NCountable; spec = Indef; p = Pos} ;
--- first_Ord = ss "first" ; DEPRECATED
for_Prep = mkPrep "çà" ;
from_Prep = mkPrep "îò" ;
he_Pron = mkPron "òîé" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Masc) PronP3 ;
here_Adv = ss "òóê" ;
here7to_Adv = ss ["äî òóê"] ;
here7from_Adv = ss ["îò òóê"] ;
how_IAdv = mkIAdv "êàê" ;
how8much_IAdv = mkIAdv "êîëêî" ;
how8many_IDet = {s = \\_ => table QForm ["êîëêî";"êîëêîòî"]; n = Pl; nonEmpty = False} ;
if_Subj = ss "àêî" ;
in8front_Prep = mkPrep "ïðåä" ;
i_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Masc) PronP1 ;
in_Prep = mkPrep (pre { "â" ;
"âúâ" / strs {"â" ; "ô" ; "Â" ; "Ô"}
for_Prep = mkPrep "за" ;
from_Prep = mkPrep "от" ;
he_Pron = mkPron "той" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Masc) PronP3 ;
here_Adv = ss "тук" ;
here7to_Adv = ss ["до тук"] ;
here7from_Adv = ss ["от тук"] ;
how_IAdv = mkIAdv "как" ;
how8much_IAdv = mkIAdv "колко" ;
how8many_IDet = {s = \\_ => table QForm ["колко";"колкото"]; n = Pl; nonEmpty = False} ;
if_Subj = ss "ако" ;
in8front_Prep = mkPrep "пред" ;
i_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Masc) PronP1 ;
in_Prep = mkPrep (pre { "в" ;
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
}) ;
it_Pron = mkPron "òî" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Neut) PronP3 ;
less_CAdv = X.mkCAdv "ïî-ìàëêî" "îò" ;
many_Det = mkDeterminerPl "ìíîãî" ;
more_CAdv = X.mkCAdv "ïîâå÷å" "îò" ;
most_Predet = {s = \\_ => "ïîâå÷åòî"} ;
much_Det = mkDeterminerSg "ìíîãî" "ìíîãî" "ìíîãî";
it_Pron = mkPron "то" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Neut) PronP3 ;
less_CAdv = X.mkCAdv "по-малко" "от" ;
many_Det = mkDeterminerPl "много" ;
more_CAdv = X.mkCAdv "повече" "от" ;
most_Predet = {s = \\_ => "повечето"} ;
much_Det = mkDeterminerSg "много" "много" "много";
must_VV =
mkVV {
s = \\_=>table {
VPres _ _ => "òðÿáâà" ;
VAorist _ _ => "òðÿáâàøå" ;
VImperfect _ _ => "òðÿáâàëî" ;
VPerfect _ => "òðÿáâàëî" ;
VPluPerfect _ => "òðÿáâàëî" ;
VPassive _ => "òðÿáâàëî" ;
VPresPart _ => "òðÿáâàëî" ;
VImperative Sg => "òðÿáâàé" ;
VImperative Pl => "òðÿáâàéòå" ;
VNoun _ => "òðÿáâàíå" ;
VGerund => "òðÿáâàéêè"
VPres _ _ => "трябва" ;
VAorist _ _ => "трябваше" ;
VImperfect _ _ => "трябвало" ;
VPerfect _ => "трябвало" ;
VPluPerfect _ => "трябвало" ;
VPassive _ => "трябвало" ;
VPresPart _ => "трябвало" ;
VImperative Sg => "трябвай" ;
VImperative Pl => "трябвайте" ;
VNoun _ => "трябване" ;
VGerund => "трябвайки"
} ;
vtype=VNormal ;
lock_V=<>
} ;
no_Utt = ss "íå" ;
on_Prep = mkPrep "íà" ;
no_Utt = ss "не" ;
on_Prep = mkPrep "на" ;
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
only_Predet = {s = \\_ => "ñàìî"} ;
or_Conj = mkConj "èëè" Sg ;
otherwise_PConj = ss "èíà÷å" ;
part_Prep = mkPrep "îò" ;
please_Voc = ss "ìîëÿ" ;
only_Predet = {s = \\_ => "само"} ;
or_Conj = mkConj "или" Sg ;
otherwise_PConj = ss "иначе" ;
part_Prep = mkPrep "от" ;
please_Voc = ss "моля" ;
possess_Prep = mkPrep [] Dat ;
quite_Adv = ss "äîñòà" ;
she_Pron = mkPron "òÿ" "íåèí" "íåéíèÿ" "íåéíèÿò" "íåéíà" "íåéíàòà" "íåéíî" "íåéíîòî" "íåéíè" "íåéíèòå" (GSg Fem) PronP3 ;
so_AdA = ss "òîëêîâà" ;
somebody_NP = mkNP "íÿêîé" (GSg Masc) (NounP3 Pos);
someSg_Det = mkDeterminerSg "íÿêîé" "íÿêîÿ" "íÿêîå" ;
somePl_Det = mkDeterminerPl "íÿêîè" ;
something_NP = mkNP "íåùî" (GSg Neut) (NounP3 Pos);
somewhere_Adv = ss "íÿêúäå" ;
that_Quant = mkQuant "îíçè" "îíàçè" "îíîâà" "îíåçè" ;
that_Subj = ss "֌" ;
there_Adv = ss "òàì" ;
there7to_Adv = ss ["äî òàì"] ;
there7from_Adv = ss ["îò òàì"] ;
therefore_PConj = ss ["òàêà ÷å"] ;
they_Pron = mkPron "òå" "òåõåí" "òåõíèÿ" "òåõíèÿò" "òÿõíà" "òÿõíàòà" "òÿõíî" "òÿõíîòî" "òåõíè" "òåõíèòå" GPl PronP3 ;
this_Quant = mkQuant "òîçè" "òàçè" "òîâà" "òåçè" ;
through_Prep = mkPrep "ïðåç" ;
too_AdA = ss "ïðåêàëåíî" ;
to_Prep = mkPrep "äî" ;
under_Prep = mkPrep "ïîä" ;
very_AdA = ss "ìíîãî" ;
want_VV = mkVV (stateV (mkV186 "èñêàì")) ;
we_Pron = mkPron "íèå" "íàø" "íàøèÿ" "íàøèÿò" "íàøà" "íàøàòà" "íàøå" "íàøåòî" "íàøè" "íàøèòå" GPl PronP1 ;
whatPl_IP = mkIP "êàêâè" "êàêâè" GPl ;
whatSg_IP = mkIP "êàêúâ" "êàêúâ" (GSg Masc) ;
when_IAdv = mkIAdv "êîãà" ;
when_Subj = ss "êîãàòî" ;
where_IAdv = mkIAdv "êúäå" ;
which_IQuant = {s = table GenNum [table QForm ["êîé";"êîéòî"];
table QForm ["êîÿ";"êîÿòî"];
table QForm ["êîå";"êîåòî"];
table QForm ["êîè";"êîèòî"]]} ;
whoSg_IP = mkIP "êîé" "êîãî" (GSg Masc) ;
whoPl_IP = mkIP "êîè" "êîè" GPl ;
why_IAdv = mkIAdv "çàùî" ;
without_Prep = mkPrep "áåç" ;
quite_Adv = ss "доста" ;
she_Pron = mkPron "тя" "неин" "нейния" "нейният" "нейна" "нейната" "нейно" "нейното" "нейни" "нейните" (GSg Fem) PronP3 ;
so_AdA = ss "толкова" ;
somebody_NP = mkNP "някой" (GSg Masc) (NounP3 Pos);
someSg_Det = mkDeterminerSg "някой" "някоя" "някое" ;
somePl_Det = mkDeterminerPl "някои" ;
something_NP = mkNP "нещо" (GSg Neut) (NounP3 Pos);
somewhere_Adv = ss "някъде" ;
that_Quant = mkQuant "онзи" "онази" "онова" "онези" ;
that_Subj = ss "че" ;
there_Adv = ss "там" ;
there7to_Adv = ss ["до там"] ;
there7from_Adv = ss ["от там"] ;
therefore_PConj = ss ["така че"] ;
they_Pron = mkPron "те" "техен" "техния" "техният" "тяхна" "тяхната" "тяхно" "тяхното" "техни" "техните" GPl PronP3 ;
this_Quant = mkQuant "този" "тази" "това" "тези" ;
through_Prep = mkPrep "през" ;
too_AdA = ss "прекалено" ;
to_Prep = mkPrep "до" ;
under_Prep = mkPrep "под" ;
very_AdA = ss "много" ;
want_VV = mkVV (stateV (mkV186 "искам")) ;
we_Pron = mkPron "ние" "наш" "нашия" "нашият" "наша" "нашата" "наше" "нашето" "наши" "нашите" GPl PronP1 ;
whatPl_IP = mkIP "какви" "какви" GPl ;
whatSg_IP = mkIP "какъв" "какъв" (GSg Masc) ;
when_IAdv = mkIAdv "кога" ;
when_Subj = ss "когато" ;
where_IAdv = mkIAdv "къде" ;
which_IQuant = {s = table GenNum [table QForm ["кой";"който"];
table QForm ["коя";"която"];
table QForm ["кое";"което"];
table QForm ["кои";"които"]]} ;
whoSg_IP = mkIP "кой" "кого" (GSg Masc) ;
whoPl_IP = mkIP "кои" "кои" GPl ;
why_IAdv = mkIAdv "защо" ;
without_Prep = mkPrep "без" ;
with_Prep = mkPrep "" WithPrep ;
yes_Utt = ss "äà" ;
youSg_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Masc) PronP2 ;
youPl_Pron = mkPron "âèå" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl PronP2 ;
youPol_Pron = mkPron "âèå" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl PronP2 ;
yes_Utt = ss "да" ;
youSg_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Masc) PronP2 ;
youPl_Pron = mkPron "вие" "ваш" "вашия" "вашият" "ваша" "вашата" "ваше" "вашето" "ваши" "вашите" GPl PronP2 ;
youPol_Pron = mkPron "вие" "ваш" "вашия" "вашият" "ваша" "вашата" "ваше" "вашето" "ваши" "вашите" GPl PronP2 ;
as_CAdv = X.mkCAdv [] "êîëêîòî" ;
as_CAdv = X.mkCAdv [] "колкото" ;
have_V2 = dirV2 (stateV (mkV186 "èìàì")) ;
have_V2 = dirV2 (stateV (mkV186 "имам")) ;
lin language_title_Utt = ss "Áúëãàðñêè" ;
lin language_title_Utt = ss "Български" ;
}

View File

@@ -1,10 +1,10 @@
--# -path=.:../abstract:../common:../prelude
--# -coding=cp1251
--# -coding=utf8
concrete SymbolBul of Symbol = CatBul ** open Prelude, ResBul in {
flags
coding = cp1251 ;
coding = utf8 ;
lin
SymbPN i = {s = i.s ; g = Neut} ;
@@ -32,15 +32,15 @@ lin
SymbNum sy = {s = \\_ => sy.s; nn = NNum Pl} ;
SymbOrd sy = {s = \\aform => sy.s ++ "-" ++
case aform of {
ASg Masc Indef => "òè" ;
ASg Fem Indef => "òà" ;
ASg Neut Indef => "òî" ;
ASg Masc Def => "òèÿ" ;
ASg Fem Def => "òàòà" ;
ASg Neut Def => "òîòî" ;
ASgMascDefNom => "òèÿò" ;
APl Indef => "òè" ;
APl Def => "òèòå"
ASg Masc Indef => "ти" ;
ASg Fem Indef => "та" ;
ASg Neut Indef => "то" ;
ASg Masc Def => "тия" ;
ASg Fem Def => "тата" ;
ASg Neut Def => "тото" ;
ASgMascDefNom => "тият" ;
APl Indef => "ти" ;
APl Def => "тите"
}
} ;
@@ -52,7 +52,7 @@ lin
MkSymb s = s ;
BaseSymb = infixSS "è" ;
BaseSymb = infixSS "и" ;
ConsSymb = infixSS bindComma ;
}

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete TextBul of Text = CatBul ** open Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
-- This will work for almost all languages except Spanish.

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
@@ -39,7 +39,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
}) vp.p
(predV vv) ;
ComplVS v s = insertObj (\\_ => bindComma ++ "֌" ++ s.s) Pos (predV v) ;
ComplVS v s = insertObj (\\_ => bindComma ++ "че" ++ s.s) Pos (predV v) ;
ComplVQ v q = insertObj (\\_ => q.s ! QDir) Pos (predV v) ;
ComplVA v ap =
@@ -50,7 +50,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
insertSlashObj2 (\\a => v.c3.s ++ ap.s ! aform a.gn Indef (RObj Acc) ! a.p) Pos (slashV v v.c2 v.subjCtrl) ;
-- test: I saw a boy to whom she said that they are here
SlashV2S v s = insertSlashObj2 (\\_ => bindComma ++ "֌" ++ s.s) Pos (slashV v v.c2 False) ;
SlashV2S v s = insertSlashObj2 (\\_ => bindComma ++ "че" ++ s.s) Pos (slashV v v.c2 False) ;
-- test: I saw a boy whom she asked who is here
SlashV2Q v q = insertSlashObj2 (\\_ => q.s ! QDir) Pos (slashV v v.c2 False) ;

View File

@@ -3,5 +3,6 @@
concrete AllCat of AllCatAbs =
LangCat,
IrregCat,
ExtraCat
** {} ;
ExtraCat
** open ExtendCat
in {} ;

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More