summaryrefslogtreecommitdiff
path: root/examples/app
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2015-06-02 09:13:15 +0000
committeraarne <aarne@chalmers.se>2015-06-02 09:13:15 +0000
commit212bfd7acc4b7f290458af1637fb8795cdf7ed3f (patch)
treeba660ad0b088c24d3a5e35cc0922ac8df7c49734 /examples/app
parentf763074eec300d7a0f7573a68577248ebce6e711 (diff)
an input grammar for French - 40 times faster, makes all the difference in the app!
Diffstat (limited to 'examples/app')
-rw-r--r--examples/app/AppFreInput.gf63
1 files changed, 63 insertions, 0 deletions
diff --git a/examples/app/AppFreInput.gf b/examples/app/AppFreInput.gf
new file mode 100644
index 000000000..884d1c01f
--- /dev/null
+++ b/examples/app/AppFreInput.gf
@@ -0,0 +1,63 @@
+--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
+
+concrete AppFre 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],
+ SentenceFre [PredVP,UseCl],
+ 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 ;
+-}
+
+}