1
0
forked from GitHub/gf-core

AppJpn.gf and a Makefile entry for App13 which includes Japanese. Everything compiles now. But Japanese has no support for chunks, because ChunkFunctor does not typecheck for it due to its richer Utt type.

This commit is contained in:
aarne
2015-01-14 17:22:47 +00:00
parent 507b52cc23
commit 6ba8851cc8
2 changed files with 54 additions and 0 deletions

48
examples/app/AppJpn.gf Normal file
View File

@@ -0,0 +1,48 @@
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
concrete AppJpn of App =
TranslateJpn - [
-- Verb
SlashV2V, -- replaced by more efficient inlined versions
Slash2V3, Slash3V3, SlashV2S, SlashV2Q, SlashV2A,
SlashVV, SlashV2VNP,
AdvVPSlash, AdVVPSlash, VPSlashPrep,
-- Sentence
PredSCVP,
AdvSlash, SlashPrep, SlashVS,
EmbedS, EmbedQS, EmbedVP, RelS,
-- Question
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
-- Idiom
CleftNP, CleftAdv,
ImpP3
-- Construction
-- Extensions
]
,PhrasebookJpn ---- - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
** open ParadigmsJpn, SyntaxJpn, 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 ;
}

View File

@@ -13,18 +13,23 @@ GFMKT=mkdir -p $(GFODIR) && gf $S -make -literal=PN,Symb -probs=$(PROBSFILE) -gf
APP11=AppEng.pgf AppBul.pgf AppChi.pgf AppGer.pgf AppSwe.pgf AppHin.pgf AppFin.pgf AppFre.pgf AppIta.pgf AppSpa.pgf AppDut.pgf
APP12=$(APP11) AppCat.pgf
APP13=$(APP12) AppJpn.pgf
# With dependencies:
App11.pgf: $(APP11)
$(GFMKT) -name=App11 $(APP11) +RTS -K200M
App12.pgf: $(APP12)
$(GFMKT) -name=App12 $(APP12) +RTS -K200M
App13.pgf: $(APP13)
$(GFMKT) -name=App13 $(APP13) +RTS -K200M
# Without dependencies:
App11:
$(GFMKT) -name=App12 $(APP11) +RTS -K200M
App12:
$(GFMKT) -name=App12 $(APP12) +RTS -K200M
App13:
$(GFMKT) -name=App13 $(APP13) +RTS -K200M
# App grammars for individual languages
AppEng.pgf:: ; $(GFMKT) -name=AppEng AppEng.gf
@@ -37,6 +42,7 @@ AppGer.pgf:: ; $(GFMKT) -name=AppGer AppGer.gf +RTS -K64M
AppHin.pgf:: ; $(GFMKT) -name=AppHin AppHin.gf
AppFre.pgf:: ; $(GFMKT) -name=AppFre AppFre.gf +RTS -K64M
AppIta.pgf:: ; $(GFMKT) -name=AppIta AppIta.gf +RTS -K64M
AppJpn.pgf:: ; $(GFMKT) -name=AppJpn AppJpn.gf +RTS -K64M
AppSpa.pgf:: ; $(GFMKT) -name=AppSpa AppSpa.gf +RTS -K64M
AppSwe.pgf:: ; $(GFMKT) -name=AppSwe AppSwe.gf