mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 09:52:55 -06:00
skeletal version of AppRus.gf
This commit is contained in:
55
examples/app/AppRus.gf
Normal file
55
examples/app/AppRus.gf
Normal file
@@ -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 ;
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@ APP12=$(APP11) AppCat.pgf
|
|||||||
APP13=$(APP12) AppJpn.pgf
|
APP13=$(APP12) AppJpn.pgf
|
||||||
APP14=$(APP13) AppTha.pgf
|
APP14=$(APP13) AppTha.pgf
|
||||||
APP15=$(APP14) AppEst.pgf
|
APP15=$(APP14) AppEst.pgf
|
||||||
|
APP16=$(APP15) AppRus.pgf
|
||||||
|
|
||||||
# With dependencies:
|
# With dependencies:
|
||||||
App11.pgf: $(APP11)
|
App11.pgf: $(APP11)
|
||||||
@@ -28,6 +29,8 @@ App14.pgf: $(APP14)
|
|||||||
$(GFMKT) -name=App14 $(APP14) +RTS -K200M
|
$(GFMKT) -name=App14 $(APP14) +RTS -K200M
|
||||||
App15.pgf: $(APP15)
|
App15.pgf: $(APP15)
|
||||||
$(GFMKT) -name=App15 $(APP15) +RTS -K200M
|
$(GFMKT) -name=App15 $(APP15) +RTS -K200M
|
||||||
|
App16.pgf: $(APP16)
|
||||||
|
$(GFMKT) -name=App16 $(APP16) +RTS -K200M
|
||||||
|
|
||||||
# Without dependencies:
|
# Without dependencies:
|
||||||
App11:
|
App11:
|
||||||
|
|||||||
3
lib/src/chunk/ChunkRus.gf
Normal file
3
lib/src/chunk/ChunkRus.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete ChunkRus of Chunk = CatRus, ExtensionsRus [VPS,VPI] ** {
|
||||||
|
|
||||||
|
}
|
||||||
12
lib/src/translator/ExtensionsRus.gf
Normal file
12
lib/src/translator/ExtensionsRus.gf
Normal file
@@ -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} ;
|
||||||
|
|
||||||
|
}
|
||||||
42
lib/src/translator/TranslateRus.gf
Normal file
42
lib/src/translator/TranslateRus.gf
Normal file
@@ -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 ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user