diff --git a/examples/app/AppRus.gf b/examples/app/AppRus.gf new file mode 100644 index 000000000..febe603ff --- /dev/null +++ b/examples/app/AppRus.gf @@ -0,0 +1,55 @@ +--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos + +concrete AppRus of App = + + TranslateRus - [ + -- Verb + SlashV2a,ComplSlash, -- replaced by a more efficient inlined version + SlashV2V, + Slash2V3, Slash3V3, SlashV2S, SlashV2Q, SlashV2A, + SlashVV, SlashV2VNP, + AdvVPSlash, AdVVPSlash, VPSlashPrep, + -- Sentence + SlashVP, SlashVS, + PredSCVP, + AdvSlash, SlashPrep, SlashVS, + EmbedS, EmbedQS, EmbedVP, RelS, + -- Question + ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP, + -- Idiom + CleftNP, CleftAdv, + ImpP3, + -- Construction + -- Extensions + PassVPSlash, PassAgentVPSlash -- not reachable anyway + ] + + ,PhrasebookRus - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, cost_V] + + ** open ParadigmsRus, SyntaxRus, Prelude in { + +flags + literal=Symb ; + +-- to suppress punctuation +lin + PSentence, PQuestion = \s -> lin Text (mkUtt s) ; + PGreetingMale, PGreetingFemale = \s -> lin Text s ; + GObjectPlease o = lin Text (mkUtt o) ; + + PhrasePhr p = {s = "+" ++ p.s} | p ; + Phrase_Chunk p = p ; + + +ComplV2V v np vp = mkVP v np vp ; +ComplV2A v np vp = mkVP v np vp ; +ComplV2Q v np vp = mkVP v np vp ; +ComplV2S v np vp = mkVP v np vp ; +ComplV3 v np vp = mkVP v np vp ; + + +ComplV2 v np = mkVP v np ; + + PassV2 v2 = passiveVP v2 ; + PassV2 v2 = passiveVP v2 ; +} diff --git a/examples/app/Makefile b/examples/app/Makefile index be54632ea..d556ebdf5 100644 --- a/examples/app/Makefile +++ b/examples/app/Makefile @@ -16,6 +16,7 @@ APP12=$(APP11) AppCat.pgf APP13=$(APP12) AppJpn.pgf APP14=$(APP13) AppTha.pgf APP15=$(APP14) AppEst.pgf +APP16=$(APP15) AppRus.pgf # With dependencies: App11.pgf: $(APP11) @@ -28,6 +29,8 @@ App14.pgf: $(APP14) $(GFMKT) -name=App14 $(APP14) +RTS -K200M App15.pgf: $(APP15) $(GFMKT) -name=App15 $(APP15) +RTS -K200M +App16.pgf: $(APP16) + $(GFMKT) -name=App16 $(APP16) +RTS -K200M # Without dependencies: App11: diff --git a/lib/src/chunk/ChunkRus.gf b/lib/src/chunk/ChunkRus.gf new file mode 100644 index 000000000..ab5a047a8 --- /dev/null +++ b/lib/src/chunk/ChunkRus.gf @@ -0,0 +1,3 @@ +concrete ChunkRus of Chunk = CatRus, ExtensionsRus [VPS,VPI] ** { + +} diff --git a/lib/src/translator/ExtensionsRus.gf b/lib/src/translator/ExtensionsRus.gf new file mode 100644 index 000000000..443649d64 --- /dev/null +++ b/lib/src/translator/ExtensionsRus.gf @@ -0,0 +1,12 @@ +--# -path=.:../abstract + +concrete ExtensionsRus of Extensions = + CatRus ** open ResRus, (E = ExtraRus), Prelude, SyntaxRus in { + +flags + coding = utf8 ; + +lincat + VPI = {s:Str} ; + +} diff --git a/lib/src/translator/TranslateRus.gf b/lib/src/translator/TranslateRus.gf new file mode 100644 index 000000000..377e292f7 --- /dev/null +++ b/lib/src/translator/TranslateRus.gf @@ -0,0 +1,42 @@ +--# -path=.:../chunk:alltenses + +concrete TranslateRus of Translate = + TenseX - [IAdv, CAdv], + CatRus, + NounRus - [PPartNP], + AdjectiveRus, + NumeralRus, + SymbolRus [ + PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP + ], + ConjunctionRus, + VerbRus - [ + UseCopula, + PassV2 -- generalized in Extensions + ], + AdverbRus, + PhraseRus, + SentenceRus, + QuestionRus, + RelativeRus, + IdiomRus, + --ConstructionRus, + --DocumentationBul, + + ChunkRus, + ExtensionsRus [ + ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI, + CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP, + DirectComplVS, DirectComplVQ, FocusObjS, + PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv, + WithoutVP, InOrderToVP, ByVP + ], + + DictionaryRus ** +{ + +flags + literal=Symb ; + +} +