summaryrefslogtreecommitdiff
path: root/examples/app/AppEng.gf
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2014-04-09 13:04:19 +0000
committeraarne <aarne@chalmers.se>2014-04-09 13:04:19 +0000
commita3921bffd777c99f83706a2879628a986c1d3e14 (patch)
treec478366d6b08dc6141499a20acb71cef2ab43c85 /examples/app/AppEng.gf
parent622ab0b44c7241da94b1edbade39b8432ac00fff (diff)
rewrote App so that it just inherits Translate and excludes some functions. This minimizes the duplication of code between Translate and App. Also added some functions, which make App 15% slower but increase the coverage and quality. This trade-off has to be studied further.
Diffstat (limited to 'examples/app/AppEng.gf')
-rw-r--r--examples/app/AppEng.gf78
1 files changed, 26 insertions, 52 deletions
diff --git a/examples/app/AppEng.gf b/examples/app/AppEng.gf
index c70b5deff..b3dc9f807 100644
--- a/examples/app/AppEng.gf
+++ b/examples/app/AppEng.gf
@@ -1,43 +1,33 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppEng of App =
- TenseX - [Pol, PNeg, PPos],
- CatEng,
- NounEng - [PPartNP],
- AdjectiveEng,
- NumeralEng,
- SymbolEng [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP,
- addGenitiveS
- ],
- ConjunctionEng,
- VerbEng [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbEng,
- PhraseEng,
- SentenceEng [
- PredVP,SlashVP,ImpVP,AdvS,
- UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionEng - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- RelativeEng,
- IdiomEng [NP, VP, Tense, Cl, ProgrVP, ExistNP],
----- ConstructionEng,
-
-
- ChunkEng,
-
- ExtensionsEng [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
- DocumentationEng,
- DictionaryEng
+ TranslateEng - [
+ -- Verb
+ ComplVS, ComplVQ, ComplVA,
+ Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A,
+ SlashVV, SlashV2VNP,
+ ReflVP,
+ AdvVPSlash, AdVVPSlash, VPSlashPrep,
+ -- Sentence
+ PredSCVP,
+ AdvSlash, SlashPrep, SlashVS,
+ EmbedS, EmbedQS, EmbedVP, RelS,
+ -- Question
+ ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
+ -- Idiom
+ CleftNP, CleftAdv,
+ ExistIP,
+ ExistNPAdv, ExistIPAdv,
+ ImpP3,
+ SelfAdvVP, SelfAdVVP, SelfNP,
+ -- Construction
+ hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl,
+ weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN,
+ where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP,
+ -- Extensions
+ PassVPSlash, PassAgentVPSlash
+ ]
,PhrasebookEng - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv]
@@ -46,28 +36,12 @@ concrete AppEng of App =
flags
literal=Symb ;
--- exceptional linearizations
-lin
- UseCl t p cl =
- G.UseCl t p cl -- I am here
- | E.ContractedUseCl t p cl -- I'm here
- ;
-
- PPos = {s = [] ; p = CPos} ;
- PNeg = {s = [] ; p = CNeg True} | {s = [] ; p = CNeg False} ;
-
-
-- to suppress punctuation
lin
PSentence, PQuestion = \s -> lin Text (mkUtt s) ;
PGreetingMale, PGreetingFemale = \s -> lin Text s ;
-
GObjectPlease o = lin Text (mkUtt o) ;
-
-
-lin
PhrasePhr p = {s = "+" ++ p.s} | p ;
-
Phrase_Chunk p = p ;
}