mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
App14 with Tha up and running!
This commit is contained in:
48
examples/app/AppTha.gf
Normal file
48
examples/app/AppTha.gf
Normal file
@@ -0,0 +1,48 @@
|
||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
||||
|
||||
concrete AppTha of App =
|
||||
|
||||
TranslateTha - [
|
||||
-- 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
|
||||
]
|
||||
|
||||
,PhrasebookTha - [at_Prep, closed_A, open_A] --- - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
|
||||
|
||||
** open ParadigmsTha, SyntaxTha, 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 ;
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ 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
|
||||
APP14=$(APP13) AppTha.pgf
|
||||
|
||||
# With dependencies:
|
||||
App11.pgf: $(APP11)
|
||||
@@ -22,6 +23,8 @@ App12.pgf: $(APP12)
|
||||
$(GFMKT) -name=App12 $(APP12) +RTS -K200M
|
||||
App13.pgf: $(APP13)
|
||||
$(GFMKT) -name=App13 $(APP13) +RTS -K200M
|
||||
App14.pgf: $(APP14)
|
||||
$(GFMKT) -name=App14 $(APP14) +RTS -K200M
|
||||
|
||||
# Without dependencies:
|
||||
App11:
|
||||
@@ -30,6 +33,8 @@ App12:
|
||||
$(GFMKT) -name=App12 $(APP12) +RTS -K200M
|
||||
App13:
|
||||
$(GFMKT) -name=App13 $(APP13) +RTS -K200M
|
||||
App14:
|
||||
$(GFMKT) -name=App14 $(APP14) +RTS -K200M
|
||||
|
||||
# App grammars for individual languages
|
||||
AppEng.pgf:: ; $(GFMKT) -name=AppEng AppEng.gf
|
||||
@@ -45,6 +50,7 @@ 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
|
||||
AppTha.pgf:: ; $(GFMKT) -name=AppTha AppTha.gf
|
||||
|
||||
# language pairs to test
|
||||
AppEngSwe: ; $(GFMKT) -name=AppEngSwe AppEng.pgf AppSwe.pgf
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
compile = runghc Compile
|
||||
|
||||
forApp:
|
||||
$(compile) -opt Bul Cat Chi Dut Eng Fin Fre Ger Hin Ita Jpn Spa Swe
|
||||
$(compile) -opt Bul Cat Chi Dut Eng Fin Fre Ger Hin Ita Jpn Spa Swe Tha
|
||||
make gfos
|
||||
|
||||
.PHONY: gfos
|
||||
|
||||
@@ -36,6 +36,7 @@ public class Translator {
|
||||
new Language("ja-JP", "Japanese","AppJpn", R.xml.qwerty),
|
||||
new Language("es-ES", "Spanish", "AppSpa", R.xml.qwerty),
|
||||
new Language("sv-SE", "Swedish", "AppSwe", R.xml.nordic),
|
||||
new Language("th-TH", "Thai", "AppTha", R.xml.nordic),
|
||||
};
|
||||
|
||||
private Context mContext;
|
||||
|
||||
Reference in New Issue
Block a user