forked from GitHub/gf-rgl
Some refactorings
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
--# -path=.:../abstract:../common:../api
|
--# -path=.:../abstract:../common:../api
|
||||||
|
|
||||||
concrete AllRus of AllRusAbs = LangRus, ExtraRus ** open ExtendRus in {flags coding=utf8;}
|
concrete AllRus of AllRusAbs = LangRus, ExtraRus, ExtendRus ** {flags coding=utf8;}
|
||||||
@@ -2,7 +2,7 @@ concrete ConstructionRus of Construction = CatRus **
|
|||||||
open Predef, SyntaxRus, SymbolicRus, (P=ParadigmsRus), ResRus, Prelude,
|
open Predef, SyntaxRus, SymbolicRus, (P=ParadigmsRus), ResRus, Prelude,
|
||||||
QuestionRus, SentenceRus, AdverbRus, AdjectiveRus, VerbRus,
|
QuestionRus, SentenceRus, AdverbRus, AdjectiveRus, VerbRus,
|
||||||
(L=LexiconRus),
|
(L=LexiconRus),
|
||||||
(N=NounRus), IdiomRus, (E=ExtendRus), (EX=ExtraRus) in {
|
(N=NounRus), IdiomRus, (EX=ExtraRus) in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
hungry_VP = mkVP (P.mkA "голодный" "" "1*a/c'" PrefShort) ;
|
hungry_VP = mkVP (P.mkA "голодный" "" "1*a/c'" PrefShort) ;
|
||||||
@@ -13,7 +13,7 @@ lin
|
|||||||
ready_VP = mkVP L.ready_A ;
|
ready_VP = mkVP L.ready_A ;
|
||||||
|
|
||||||
-- : NP -> QCl ; -- what is x's name / wie heisst x (Ger)
|
-- : NP -> QCl ; -- what is x's name / wie heisst x (Ger)
|
||||||
what_name_QCl np = E.PredIAdvVP how_IAdv (ComplSlash (SlashV2a (P.mkV2 (P.mkV Imperfective "звать" "зову" "зовёт") Acc)) np) ;
|
what_name_QCl np = QuestIAdv how_IAdv (GenericCl (ComplSlash (SlashV2a (P.mkV2 (P.mkV Imperfective "звать" "зову" "зовёт") Acc)) np)) ;
|
||||||
|
|
||||||
-- : NP -> NP -> Cl ; -- x's name is y / x s'appelle y (Fre)
|
-- : NP -> NP -> Cl ; -- x's name is y / x s'appelle y (Fre)
|
||||||
have_name_Cl np np1 = {
|
have_name_Cl np np1 = {
|
||||||
|
|||||||
@@ -2,32 +2,36 @@
|
|||||||
|
|
||||||
concrete ExtendRus of Extend =
|
concrete ExtendRus of Extend =
|
||||||
CatRus ** ExtendFunctor - [
|
CatRus ** ExtendFunctor - [
|
||||||
-- iFem_Pron,
|
iFem_Pron,
|
||||||
theyFem_Pron, weFem_Pron,
|
-- theyFem_Pron, weFem_Pron,
|
||||||
-- youFem_Pron,
|
youFem_Pron,
|
||||||
youPlFem_Pron, youPolFem_Pron, youPolPlFem_Pron, youPolPl_Pron,
|
-- youPlFem_Pron, youPolFem_Pron, youPolPlFem_Pron, youPolPl_Pron,
|
||||||
VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList,
|
-- VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList,
|
||||||
UseComp, RelNP, UseComp_estar, SubjRelNP, PredAPVP, ImpersCl, UseComp, CompAP, EmbedVP, ExistNP, UseQCl,
|
-- UseComp, RelNP, UseComp_estar, SubjRelNP, PredAPVP, ImpersCl, UseComp, CompAP, EmbedVP, ExistNP, UseQCl,
|
||||||
QuestCl, ExistNP, UseQCl, ExistIP, AdvVP, AdvVP, AdvVP, UseComp, CompAP, ExistS, ExistNPQS, ExistIPQS,
|
-- QuestCl, ExistNP, UseQCl, ExistIP, AdvVP, AdvVP, AdvVP, UseComp, CompAP, ExistS, ExistNPQS, ExistIPQS,
|
||||||
ComplDirectVS, ComplDirectVQ, AdvIsNPAP, AdAdV, AdjAsCN, AdjAsNP,
|
-- ComplDirectVS, ComplDirectVQ, AdvIsNPAP, AdAdV, AdjAsCN, AdjAsNP,
|
||||||
-- ApposNP,
|
ApposNP,
|
||||||
AdvIsNP,
|
-- AdvIsNP,
|
||||||
BaseVPS, ConsVPS, BaseVPI, ConsVPI, BaseVPS2, ConsVPS2, BaseVPI2, ConsVPI2,
|
-- BaseVPS, ConsVPS, BaseVPI, ConsVPI, BaseVPS2, ConsVPS2, BaseVPI2, ConsVPI2,
|
||||||
MkVPS, ConjVPS, PredVPS, MkVPI, ConjVPI, ComplVPIVV,
|
-- MkVPS, ConjVPS, PredVPS, MkVPI, ConjVPI, ComplVPIVV,
|
||||||
MkVPS2, ConjVPS2, ComplVPS2, MkVPI2, ConjVPI2, ComplVPI2,
|
-- MkVPS2, ConjVPS2, ComplVPS2, MkVPI2, ConjVPI2, ComplVPI2,
|
||||||
Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, ByVP, CompBareCN,
|
-- Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, ByVP, CompBareCN,
|
||||||
CompIQuant, CompQS, CompS, CompVP, ComplBareVS, ComplGenVV, ComplSlashPartLast, ComplVPSVV, CompoundAP,
|
-- CompIQuant, CompQS, CompS, CompVP, ComplBareVS, ComplGenVV, ComplSlashPartLast, ComplVPSVV, CompoundAP,
|
||||||
CompoundN, ConjRNP, ConjVPS, ConsVPS, Cons_nr_RNP, Cons_rr_RNP, DetNPMasc, DetNPFem, EmbedPresPart, EmptyRelSlash,
|
-- CompoundN, ConjRNP, ConjVPS, ConsVPS, Cons_nr_RNP, Cons_rr_RNP, DetNPMasc, DetNPFem, EmbedPresPart, EmptyRelSlash,
|
||||||
ExistsNP, ExistCN, ExistMassCN, ExistPluralCN, ProDrop,
|
-- ExistsNP, ExistCN, ExistMassCN, ExistPluralCN, ProDrop,
|
||||||
FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
-- FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
||||||
GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP,
|
-- GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP,
|
||||||
PassAgentVPSlash, PassVPSlash, ProgrVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
InOrderToVP,
|
||||||
EmbedSSlash, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
-- MkVPS, NominalizeVPSlashNP,
|
||||||
-- PredIAdvVP,
|
-- PassAgentVPSlash, PassVPSlash, ProgrVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||||
UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2
|
-- EmbedSSlash, PresPartAP,
|
||||||
|
PurposeVP,
|
||||||
|
-- ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
||||||
|
PredIAdvVP
|
||||||
|
-- UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2
|
||||||
]
|
]
|
||||||
with (Grammar=GrammarRus)
|
with (Grammar=GrammarRus)
|
||||||
** open Prelude, ResRus, ParadigmsRus, (E=Extend) in {
|
** open Prelude, ResRus, ParadigmsRus in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
RNP = {s : Agr => Str} ;
|
RNP = {s : Agr => Str} ;
|
||||||
@@ -37,12 +41,23 @@ lin
|
|||||||
-- : NP -> NP -> NP ; -- Mr Macron, the president of France,
|
-- : NP -> NP -> NP ; -- Mr Macron, the president of France,
|
||||||
ApposNP np np2 = {
|
ApposNP np np2 = {
|
||||||
s=\\cas=> np.s ! cas ++ embedInCommas (np2.s ! cas) ;
|
s=\\cas=> np.s ! cas ++ embedInCommas (np2.s ! cas) ;
|
||||||
|
pron=False ;
|
||||||
a=np.a
|
a=np.a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : IAdv -> VP -> QCl ; -- how to walk?
|
-- : IAdv -> VP -> QCl ; -- how to walk?
|
||||||
PredIAdvVP iadv vp = QuestIAdv iadv (GenericCl vp) ; -- DEFAULT how does one walk
|
PredIAdvVP iadv vp = QuestIAdv iadv (GenericCl vp) ; -- DEFAULT how does one walk
|
||||||
|
|
||||||
|
-- : VP -> Adv ; -- (in order) to publish the document
|
||||||
|
InOrderToVP vp = lin Adv ({
|
||||||
|
s = "чтобы" ++ vp.adv ! Ag (GSg Neut) P3 ++ (verbInf vp.verb) ++ vp.dep ++ vp.compl ! Ag (GSg Neut) P3
|
||||||
|
}) ;
|
||||||
|
|
||||||
|
-- : VP -> Adv ; -- to become happy
|
||||||
|
PurposeVP vp = lin Adv ({
|
||||||
|
s = vp.adv ! Ag (GSg Neut) P3 ++ (verbInf vp.verb) ++ vp.dep ++ vp.compl ! Ag (GSg Neut) P3
|
||||||
|
}) ;
|
||||||
|
|
||||||
iFem_Pron = personalPron (Ag (GSg Fem) P1) ;
|
iFem_Pron = personalPron (Ag (GSg Fem) P1) ;
|
||||||
youFem_Pron = personalPron (Ag (GSg Fem) P2) ;
|
youFem_Pron = personalPron (Ag (GSg Fem) P2) ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ concrete GrammarRus of Grammar =
|
|||||||
RelativeRus,
|
RelativeRus,
|
||||||
ConjunctionRus,
|
ConjunctionRus,
|
||||||
PhraseRus,
|
PhraseRus,
|
||||||
TextRus,
|
TextX,
|
||||||
StructuralRus,
|
StructuralRus,
|
||||||
IdiomRus,
|
IdiomRus,
|
||||||
TenseRus
|
TenseRus
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
concrete TenseRus of Tense = CatRus, TenseX - [PNeg,PPos]
|
concrete TenseRus of Tense = TenseX - [PNeg,PPos] ** open (R = ParamX) in {
|
||||||
** open ResRus, (P=ParamRus), Prelude in {
|
|
||||||
flags coding=utf8 ; optimize=all ;
|
flags coding=utf8 ; optimize=all ;
|
||||||
lin
|
lin
|
||||||
PNeg = {
|
PNeg = {
|
||||||
s = "не" ;
|
s = "не" ;
|
||||||
p = Neg
|
p = R.Neg
|
||||||
} ;
|
} ;
|
||||||
PPos = {
|
PPos = {
|
||||||
s = [] ;
|
s = [] ;
|
||||||
p = Pos
|
p = R.Pos
|
||||||
} ;
|
} ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user