1
0
forked from GitHub/gf-core

skeletal version of AppRus.gf

This commit is contained in:
krasimir
2016-05-11 11:24:31 +00:00
parent 4ce95de1bc
commit 2941e2364f
5 changed files with 115 additions and 0 deletions

55
examples/app/AppRus.gf Normal file
View 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 ;
}

View File

@@ -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:

View File

@@ -0,0 +1,3 @@
concrete ChunkRus of Chunk = CatRus, ExtensionsRus [VPS,VPI] ** {
}

View 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} ;
}

View 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 ;
}