summaryrefslogtreecommitdiff
path: root/examples/app
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2015-06-02 12:59:29 +0000
committeraarne <aarne@chalmers.se>2015-06-02 12:59:29 +0000
commit3643e20406abf83d2a41d8d46dd5c66237ef1727 (patch)
tree0256c6bfd6b2a4b356ff5a648763b15d96c2cd48 /examples/app
parenteb07e4e8622e11087c5f6c14cd35d1575fcea3a8 (diff)
copied examples/app to examples/slowApp; the new app is a bit scaled down but much faster
Diffstat (limited to 'examples/app')
-rw-r--r--examples/app/App.gf10
-rw-r--r--examples/app/AppBul.gf7
-rw-r--r--examples/app/AppCat.gf7
-rw-r--r--examples/app/AppChi.gf7
-rw-r--r--examples/app/AppDut.gf7
-rw-r--r--examples/app/AppEng.gf7
-rw-r--r--examples/app/AppFin.gf7
-rw-r--r--examples/app/AppFre.gf14
-rw-r--r--examples/app/AppFre.pgfbin0 -> 13481805 bytes
-rw-r--r--examples/app/AppFreInput.gf68
-rw-r--r--examples/app/AppGer.gf7
-rw-r--r--examples/app/AppHin.gf7
-rw-r--r--examples/app/AppIta.gf7
-rw-r--r--examples/app/AppJpn.gf7
-rw-r--r--examples/app/AppSpa.gf7
-rw-r--r--examples/app/AppSwe.gf7
-rw-r--r--examples/app/AppTha.gf7
-rw-r--r--examples/app/Makefile3
-rw-r--r--examples/app/Makefile27
-rw-r--r--examples/app/MissApp.hs54
-rw-r--r--examples/app/MkApp.hs10
-rw-r--r--examples/app/README36
-rw-r--r--examples/app/app.probs2
-rw-r--r--examples/app/fre.tmp4
24 files changed, 105 insertions, 194 deletions
diff --git a/examples/app/App.gf b/examples/app/App.gf
index 24f4bb67c..112a930bb 100644
--- a/examples/app/App.gf
+++ b/examples/app/App.gf
@@ -1,11 +1,15 @@
+
+
abstract App =
Translate - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -28,10 +32,14 @@ fun
PhrasePhr : Phrase -> Phr ;
Phrase_Chunk : Phrase -> Chunk ;
+ ComplV2 : V2 -> NP -> VP ;
+
+{-
ComplV2V : V2V -> NP -> VP -> VP ;
ComplV2A : V2A -> NP -> AP -> VP ;
ComplV2Q : V2Q -> NP -> QS -> VP ;
ComplV2S : V2S -> NP -> S -> VP ;
ComplV3 : V3 -> NP -> NP -> VP ;
+-}
}
diff --git a/examples/app/AppBul.gf b/examples/app/AppBul.gf
index 8bbfd202d..2c0481b11 100644
--- a/examples/app/AppBul.gf
+++ b/examples/app/AppBul.gf
@@ -4,11 +4,13 @@ concrete AppBul of App =
TranslateBul - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -44,4 +46,7 @@ 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 ;
+
}
diff --git a/examples/app/AppCat.gf b/examples/app/AppCat.gf
index cd6290620..402f46b3f 100644
--- a/examples/app/AppCat.gf
+++ b/examples/app/AppCat.gf
@@ -5,11 +5,13 @@ concrete AppCat of App =
TranslateCat - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -44,4 +46,7 @@ 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 ;
+
}
diff --git a/examples/app/AppChi.gf b/examples/app/AppChi.gf
index 8e563c257..26e72c936 100644
--- a/examples/app/AppChi.gf
+++ b/examples/app/AppChi.gf
@@ -4,11 +4,13 @@ concrete AppChi of App =
TranslateChi - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -45,4 +47,7 @@ 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 ;
+
}
diff --git a/examples/app/AppDut.gf b/examples/app/AppDut.gf
index 0b89b593f..55a63b192 100644
--- a/examples/app/AppDut.gf
+++ b/examples/app/AppDut.gf
@@ -4,11 +4,13 @@ concrete AppDut of App =
TranslateDut - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -43,4 +45,7 @@ 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 ;
+
}
diff --git a/examples/app/AppEng.gf b/examples/app/AppEng.gf
index e08a20185..4096b9042 100644
--- a/examples/app/AppEng.gf
+++ b/examples/app/AppEng.gf
@@ -4,11 +4,13 @@ concrete AppEng of App =
TranslateEng - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -42,4 +44,7 @@ lin
ComplV2S v np vp = mkVP v np vp ;
ComplV3 v np vp = mkVP v np vp ;
+
+ComplV2 v np = mkVP v np ;
+
}
diff --git a/examples/app/AppFin.gf b/examples/app/AppFin.gf
index e669ac618..6cd5df06a 100644
--- a/examples/app/AppFin.gf
+++ b/examples/app/AppFin.gf
@@ -4,11 +4,13 @@ concrete AppFin of App =
TranslateFin - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -43,4 +45,7 @@ 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 ;
+
}
diff --git a/examples/app/AppFre.gf b/examples/app/AppFre.gf
index 87ce3c132..e32f5d4f3 100644
--- a/examples/app/AppFre.gf
+++ b/examples/app/AppFre.gf
@@ -1,14 +1,15 @@
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
concrete AppFre of App =
-
TranslateFre - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -20,8 +21,6 @@ concrete AppFre of App =
-- Construction
-- Extensions
]
-
-
,PhrasebookFre - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
** open ParadigmsFre, SyntaxFre, Prelude in {
@@ -37,11 +36,16 @@ lin
PhrasePhr p = {s = "+" ++ p.s} | p ;
Phrase_Chunk p = p ;
-
+ ComplV2 v np = mkVP v np ;
+{-
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 ;
}
diff --git a/examples/app/AppFre.pgf b/examples/app/AppFre.pgf
new file mode 100644
index 000000000..c271c60f1
--- /dev/null
+++ b/examples/app/AppFre.pgf
Binary files differ
diff --git a/examples/app/AppFreInput.gf b/examples/app/AppFreInput.gf
deleted file mode 100644
index d0c95fe90..000000000
--- a/examples/app/AppFreInput.gf
+++ /dev/null
@@ -1,68 +0,0 @@
---# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
-
-concrete AppFreInput of App =
-{-
- TranslateFre - [
----- SlashVP, SlashVS, ---- expensive functions in Fre
- -- 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
- ]
--}
- NounFre - [PPartNP],
- AdjectiveFre,
- VerbFre [UseV,CompAP,CompAdv,UseComp,AdvVP,SlashV2a,ComplSlash],
- SentenceFre [PredVP,UseCl],
- QuestionFre - [QuestCl,QuestIAdv,ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP],
- ConjunctionFre,
- ConstructionFre,
- TranslateFre [QuestCl,QuestIAdv],
- IdiomFre - [CleftNP, CleftAdv,ImpP3],
- TenseFre,
- PhraseFre,
- AdverbFre,
- NumeralFre,
- DocumentationFre,
- SymbolFre [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- DictionaryFre,
- ChunkFre
-
- ,PhrasebookFre - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
-
- ** open ParadigmsFre, SyntaxFre, Prelude in {
-
-flags
- literal=Symb ;
-
-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 ;
--}
-
-}
diff --git a/examples/app/AppGer.gf b/examples/app/AppGer.gf
index 72dbc31f2..014e68547 100644
--- a/examples/app/AppGer.gf
+++ b/examples/app/AppGer.gf
@@ -4,11 +4,13 @@ concrete AppGer of App =
TranslateGer - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -43,4 +45,7 @@ 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 ;
+
}
diff --git a/examples/app/AppHin.gf b/examples/app/AppHin.gf
index 0bddfb3bf..d14033d0c 100644
--- a/examples/app/AppHin.gf
+++ b/examples/app/AppHin.gf
@@ -4,11 +4,13 @@ concrete AppHin of App =
TranslateHin - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -43,4 +45,7 @@ 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 ;
+
}
diff --git a/examples/app/AppIta.gf b/examples/app/AppIta.gf
index 7041d43f8..f4f8886eb 100644
--- a/examples/app/AppIta.gf
+++ b/examples/app/AppIta.gf
@@ -4,11 +4,13 @@ concrete AppIta of App =
TranslateIta - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -42,4 +44,7 @@ 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 ;
+
}
diff --git a/examples/app/AppJpn.gf b/examples/app/AppJpn.gf
index dc390d051..2a119206e 100644
--- a/examples/app/AppJpn.gf
+++ b/examples/app/AppJpn.gf
@@ -4,11 +4,13 @@ concrete AppJpn of App =
TranslateJpn - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -45,4 +47,7 @@ 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 ;
+
}
diff --git a/examples/app/AppSpa.gf b/examples/app/AppSpa.gf
index 6e57da478..fbea1e917 100644
--- a/examples/app/AppSpa.gf
+++ b/examples/app/AppSpa.gf
@@ -5,11 +5,13 @@ concrete AppSpa of App =
TranslateSpa - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -44,4 +46,7 @@ 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 ;
+
}
diff --git a/examples/app/AppSwe.gf b/examples/app/AppSwe.gf
index 093a1e91f..1aca7874c 100644
--- a/examples/app/AppSwe.gf
+++ b/examples/app/AppSwe.gf
@@ -3,11 +3,13 @@
concrete AppSwe of App =
TranslateSwe - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -42,4 +44,7 @@ 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 ;
+
}
diff --git a/examples/app/AppTha.gf b/examples/app/AppTha.gf
index c1fc138e7..ee17ce7b2 100644
--- a/examples/app/AppTha.gf
+++ b/examples/app/AppTha.gf
@@ -4,11 +4,13 @@ concrete AppTha of App =
TranslateTha - [
-- Verb
- SlashV2V, -- replaced by more efficient inlined versions
+ 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,
@@ -45,4 +47,7 @@ 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 ;
+
}
diff --git a/examples/app/Makefile b/examples/app/Makefile
index f1927718e..26023d7ce 100644
--- a/examples/app/Makefile
+++ b/examples/app/Makefile
@@ -14,7 +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 AppFreInput.pgf
+APP14=$(APP13) AppTha.pgf
# With dependencies:
App11.pgf: $(APP11)
@@ -46,7 +46,6 @@ AppFin.pgf:: ; $(GFMKT) -name=AppFin AppFin.gf +RTS -K64M
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
-AppFreInput.pgf:: ; $(GFMKT) -name=AppFreInput AppFreInput.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
diff --git a/examples/app/Makefile2 b/examples/app/Makefile2
deleted file mode 100644
index 914ee4292..000000000
--- a/examples/app/Makefile2
+++ /dev/null
@@ -1,7 +0,0 @@
-P=../phrasebook
-L=../../lib/src
-GFPATH=$L/chunk:$L/translator:$L/finnish/stemmed:$L/finnish:$P
-J=-j +RTS -N4 -A20M -RTS
-
-App.pgf::
- gf -s -make $J -probs=./app.probs -path=$(GFPATH) -gfo-dir gfo App???.gf
diff --git a/examples/app/MissApp.hs b/examples/app/MissApp.hs
deleted file mode 100644
index c5faa41ff..000000000
--- a/examples/app/MissApp.hs
+++ /dev/null
@@ -1,54 +0,0 @@
-module MissApp where
-
-import qualified Data.Set as S
-import qualified Data.Map as M
-import Data.Char
-
--- prerequisite: pg -missing | wf -file=missing-app.txt
-
-missFile = "missing-app.txt"
-
-allLangs = words "AppBul AppCat AppChi AppDut AppEng AppFin AppFre AppGer AppHin AppIta AppSpa AppSwe"
-
-type Lang = String
-type Fun = String
-
-type MissMap = M.Map Lang (S.Set Fun)
-
-getMissMap :: FilePath -> IO MissMap
-getMissMap file = do
- ms <- readFile file >>= return . map words . lines
- return $ M.fromList [(lang,S.fromList ws) | lang:":":ws <- ms]
-
-ifMiss :: MissMap -> Lang -> Fun -> Bool
-ifMiss mm lang fun = case M.lookup lang mm of
- Just ws -> S.member fun ws
- _ -> error $ "language not found: " ++ lang
-
-allMissLangs :: MissMap -> Fun -> [Lang]
-allMissLangs mm fun = [l | l <- allLangs, ifMiss mm l fun]
-
-allMissFuns :: MissMap -> Lang -> [Fun]
-allMissFuns mm lang = maybe [] S.toList $ M.lookup lang mm
-
-isSyntaxFun :: Fun -> Bool
-isSyntaxFun (f:un) = isUpper f && any isUpper un -- the latter to exclude Phrasebook
-
-allMissingSyntaxFuns :: MissMap -> [(Lang,[Fun])]
-allMissingSyntaxFuns mm = [(l,takeWhile isSyntaxFun $ allMissFuns mm l) | l <- allLangs] -- takeWhile works on the sorted list
-
-allMissingSuchFuns :: MissMap -> (Fun -> Bool) -> [(Lang,[Fun])]
-allMissingSuchFuns mm f = [(l,filter f $ allMissFuns mm l) | l <- allLangs]
-
-allMissingThoseFuns :: MissMap -> [Fun] -> [(Lang,[Fun])]
-allMissingThoseFuns mm fs = let s = S.fromList fs in allMissingSuchFuns mm (flip S.member s)
-
-parts :: Fun -> [String]
-parts f = words (map (\c -> if c =='_' then ' ' else c) f)
-
-catOf :: Fun -> String
-catOf = last . parts
-
-prepareMissing :: MissMap -> Lang -> String -> IO ()
-prepareMissing mm lang cat = putStrLn $ unlines
- [ "lin " ++ p ++ " = mk" ++ cat ++ " \"\" ;"| (l,ps) <- allMissingSuchFuns mm (\f -> catOf f == cat), l == lang, p <- ps]
diff --git a/examples/app/MkApp.hs b/examples/app/MkApp.hs
index e53392feb..47d336064 100644
--- a/examples/app/MkApp.hs
+++ b/examples/app/MkApp.hs
@@ -1,9 +1,9 @@
-- update the import list of every language
-- although possibly some extra definitions at the end
--- the new files are produced in ./tmp/
+-- the new files are produced in ./tmp/ which has to be created first
-- usage: runghc MkApp.hs
-langs = words "Bul Cat Chi Dut Eng Fin Fre Ger Hin Ita Spa Swe"
+langs = words "Bul Cat Chi Dut Eng Fin Fre Ger Hin Ita Jpn Spa Swe Tha"
appCnc lang = "App" ++ lang ++ ".gf"
appAbs = "App.gf"
@@ -26,10 +26,6 @@ extraLines = -- [] -- default: no extra
[
"",
- "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 ;",
""
] \ No newline at end of file
diff --git a/examples/app/README b/examples/app/README
deleted file mode 100644
index 3f62cbea8..000000000
--- a/examples/app/README
+++ /dev/null
@@ -1,36 +0,0 @@
-Grammar for coloured translation app.
-
-(c) Aarne Ranta 2014 under GPL. Last modified 6/5/2014.
-
-1. Make sure you have the latest RGL compiled and available. Test this for instance in GF shell by typing
-
- import alltenses/LangEng.gfo
-
-2. Check that you have the following file structure, which holds in the standard GF
-repository (darcs or github):
-
- GF/lib/src/translator -- the translator extensions of RGL
- GF/lib/src/german -- German RGL sources, needed for DictGer (morphological Dict)
- GF/lib/src/finnish -- Finnish RGL sources, needed for StemFin
- GF/lib/src/finnish/stemmed -- StemFin, a special file for compact Finnish runtime
- GF/lib/src/api -- Syntax sources
- GF/lib/src/chunk -- Chunk sources
- GF/examples/phrasebook -- Phrasebook sources
- GF/examples/app -- App sources (this directory)
-
-3. Do 'make' and take a cup of coffee. If you have multiple cores, do first 'make Phrasebook' and then 'make -j App11.pgf' and take an espresso.
-
-4. Go to GF/src/ui/android and follow the README
-
-5. Before the final 'ant debug install', do the following:
-
- cd assets/
- rm *pgf*
- cp -p <Your-GF>/examples/app/App11.pgf .
- gf -make -split-pgf App11.pgf +RTS -K200M
- rm App11.pgf
- cd ..
- ant debug install
-
-Removing superfluous pgf files is recommended, because otherwise they will be copied to the app and
-increase its size unnecessarily.
diff --git a/examples/app/app.probs b/examples/app/app.probs
index 604c3983a..e9c3d684c 100644
--- a/examples/app/app.probs
+++ b/examples/app/app.probs
@@ -58,7 +58,7 @@ ComplVPIVV 1.629348323337908e-4
ComplVQ 3.3840311330864245e-4
ComplVS 0.10664084776246609
ComplVV 6.258577578913727e-2
-CompoundN 0.10736547702286556
+CompoundN 0.010736547702286556
ConjAP 2.1189670416781e-3
ConjAdV 9.744689144416293e-5
ConjAdv 1.0922898208991453e-3
diff --git a/examples/app/fre.tmp b/examples/app/fre.tmp
new file mode 100644
index 000000000..dfff9b687
--- /dev/null
+++ b/examples/app/fre.tmp
@@ -0,0 +1,4 @@
+je suis ici
+ma femme est allée a Nice
+où est la voiture
+personne ne vous aime