summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/app/App.gf61
-rw-r--r--examples/app/AppBul.gf70
-rw-r--r--examples/app/AppChi.gf83
-rw-r--r--examples/app/AppEng.gf78
-rw-r--r--examples/app/AppFin.gf77
-rw-r--r--examples/app/AppFre.gf104
-rw-r--r--examples/app/AppGer.gf75
-rw-r--r--examples/app/AppHin.gf69
-rw-r--r--examples/app/AppIta.gf76
-rw-r--r--examples/app/AppSpa.gf75
-rw-r--r--examples/app/AppSwe.gf68
11 files changed, 307 insertions, 529 deletions
diff --git a/examples/app/App.gf b/examples/app/App.gf
index d6d3f3bed..faaefb93c 100644
--- a/examples/app/App.gf
+++ b/examples/app/App.gf
@@ -1,42 +1,37 @@
abstract App =
-
--- modules in Grammar, excluding Structural
- Tense,
- Noun - [PPartNP], -- to be generalized
- Adjective,
- Numeral,
- Conjunction,
- Verb [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- Adverb,
- Phrase,
- Sentence,
- Question - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- Relative,
- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP],
-
- Symbol [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP], ---- why only these?
-
- Chunk,
-
----- Construction,
- Extensions [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
- Dictionary,
- Documentation
-
+ Translate - [
+ -- 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
+ ]
,Phrasebook
** {
flags
startcat=Phr ;
----- heuristic_search_factor=0.90; -- doesn't seem to affect speed or quality much
+ heuristic_search_factor=0.80; -- doesn't seem to affect speed or quality much
fun
PhrasePhr : Phrase -> Phr ;
diff --git a/examples/app/AppBul.gf b/examples/app/AppBul.gf
index fa90ac984..868807777 100644
--- a/examples/app/AppBul.gf
+++ b/examples/app/AppBul.gf
@@ -1,47 +1,37 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppBul of App =
- TenseX - [IAdv, CAdv],
- NounBul - [PPartNP],
- AdjectiveBul,
- NumeralBul,
- SymbolBul [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionBul,
- VerbBul [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbBul,
- PhraseBul,
- SentenceBul [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionBul - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- RelativeBul,
- IdiomBul [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionBul,
-
- ChunkBul,
-
- ExtensionsBul [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
-
- DocumentationBul,
- DictionaryBul
+
+ TranslateBul - [
+ -- 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
+ ]
,PhrasebookBul - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
- ** open MorphoBul, ResBul, ParadigmsBul, SyntaxBul, CommonScand, (E = ExtraBul), Prelude in {
+ ** open ParadigmsBul, SyntaxBul, Prelude in {
flags
literal=Symb ;
@@ -50,13 +40,9 @@ flags
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 ;
}
diff --git a/examples/app/AppChi.gf b/examples/app/AppChi.gf
index f880468d6..1367d839f 100644
--- a/examples/app/AppChi.gf
+++ b/examples/app/AppChi.gf
@@ -1,78 +1,49 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppChi of App =
- TenseChi,
- NounChi - [PPartNP],
- AdjectiveChi,
- NumeralChi,
- SymbolChi [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionChi,
- VerbChi [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompNP,CompAdv,CompCN
--- ,AdvVP -- overridden
- ,AdVVP
- ],
- AdverbChi,
- PhraseChi,
- SentenceChi [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionChi - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
- QuestCl -- overridden
- ],
- RelativeChi,
- IdiomChi [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionChi,
-
- ChunkChi,
-
- ExtensionsChi [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
- DocumentationChi,
- DictionaryChi
+ TranslateChi - [
+ -- 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
+ ]
,PhrasebookChi - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep]
- ** open ResChi, ParadigmsChi, SyntaxChi, CommonScand, (E = ExtraChi), (G = GrammarChi), Prelude in {
+ ** open ParadigmsChi, SyntaxChi, Prelude in {
flags
literal=Symb ;
--- Chinese-specific overrides
-
-lin
- CompAP = G.CompAP | E.CompBareAP ; -- he is good | he good
-
- AdvVP vp adv = G.AdvVP vp adv | E.TopicAdvVP vp adv ; -- he *today* here sleeps | *today* he here sleeps
-
- QuestCl cl = G.QuestCl cl | E.QuestRepV cl ; -- he comes 'ma' | he come not come
-
-
-
-
-
-- 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 ;
}
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 ;
}
diff --git a/examples/app/AppFin.gf b/examples/app/AppFin.gf
index 40b15a3e2..bb3c193a7 100644
--- a/examples/app/AppFin.gf
+++ b/examples/app/AppFin.gf
@@ -1,70 +1,47 @@
--# -path=.:src/chunk:src/finnish/stemmed:src/finnish:src/api:src/translator:../examples/phrasebook/gfos
concrete AppFin of App =
- TenseX,
- NounFin - [
- PPartNP,
- UsePron, PossPron -- Fin specific: replaced by variants with prodrop
- ],
- AdjectiveFin,
- NumeralFin,
- SymbolFin [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionFin,
- VerbFin [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbFin,
- PhraseFin,
- SentenceFin [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionFin - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- RelativeFin,
- IdiomFin [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionFin,
- ChunkFin,
-
- ExtensionsFin [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
-
- DocumentationFin,
- DictionaryFin
+ TranslateFin - [
+ -- 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
+ ]
,PhrasebookFin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A]
- ** open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, (E = ExtraFin), (G = GrammarFin), Prelude in {
+ ** open ParadigmsFin, SyntaxFin, Prelude in {
flags
literal=Symb ;
--- pro-drop exceptions: here as second rather than first alternative
-lin
- UsePron p = G.UsePron p | G.UsePron (E.ProDrop p) ;
- PossPron p = G.PossPron p | E.ProDropPoss p ;
-
--- 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 ;
}
diff --git a/examples/app/AppFre.gf b/examples/app/AppFre.gf
index 22c4e8cac..3bbf68070 100644
--- a/examples/app/AppFre.gf
+++ b/examples/app/AppFre.gf
@@ -1,96 +1,48 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppFre of App =
- TenseFre,
- NounFre - [PPartNP],
- AdjectiveFre,
- NumeralFre,
- SymbolFre [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionFre,
- VerbFre [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbFre,
- PhraseFre,
- SentenceFre [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionFre - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
- QuestCl, QuestIAdv
- ],
- RelativeFre,
- IdiomFre [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionFre,
-
- ChunkFre,
- ExtensionsFre [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
+ TranslateFre - [
+ -- 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
+ ]
- DocumentationFre,
- DictionaryFre
- ,PhrasebookFre - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A]
+ ,PhrasebookFre - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
- ** open MorphoFre, PhonoFre, ResFre, ParadigmsFre, SyntaxFre, CommonScand, (E = ExtraFre), (G = GrammarFre), Prelude in {
+ ** open ParadigmsFre, SyntaxFre, Prelude in {
flags
literal=Symb ;
----------------------------
-lin
- QuestCl cl =
- {s = \\t,a,p => -- est-ce qu'il dort ?
- let cls = cl.s ! DDir ! t ! a ! p
- in table {
- QDir => "est-ce" ++ elisQue ++ cls ! Indic ;
- QIndir => subjIf ++ cls ! Indic
- }
- }
- | {s = \\t,a,p => -- dort-il ?
- let cls = cl.s ! DInv ! t ! a ! p
- in table {
- QDir => cls ! Indic ;
- QIndir => subjIf ++ cls ! Indic
- }
- }
- | G.QuestCl cl -- il dort ?
- ;
-
-
- QuestIAdv iadv cl =
- G.QuestIAdv iadv cl -- où dort-il
- | {s = \\t,a,p,q => -- où est-ce qu'il dort
- let
- ord = DDir ;
- cls = cl.s ! ord ! t ! a ! p ! Indic ;
- why = iadv.s
- in why ++ "est-ce" ++ elisQue ++ cls
- } ;
-
----------------------------
-
--- 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 ;
}
diff --git a/examples/app/AppGer.gf b/examples/app/AppGer.gf
index 7b97a7c1f..71db7a3ce 100644
--- a/examples/app/AppGer.gf
+++ b/examples/app/AppGer.gf
@@ -1,47 +1,37 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppGer of App =
- TenseGer,
- NounGer - [PPartNP],
- AdjectiveGer,
- NumeralGer,
- SymbolGer [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionGer,
- VerbGer [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbGer,
- PhraseGer,
- SentenceGer [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionGer - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- RelativeGer,
- IdiomGer [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionGer,
- ChunkGer,
-
- ExtensionsGer [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
-
- DocumentationGer,
- DictionaryGer
-
- ,PhrasebookGer - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
-
- ** open MorphoGer, ResGer, ParadigmsGer, SyntaxGer, CommonScand, (E = ExtraGer), Prelude in {
+ TranslateGer - [
+ -- 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
+ ]
+
+ ,PhrasebookGer - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
+
+ ** open ParadigmsGer, SyntaxGer, Prelude in {
flags
literal=Symb ;
@@ -50,13 +40,8 @@ flags
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 ;
}
diff --git a/examples/app/AppHin.gf b/examples/app/AppHin.gf
index e95d5d177..f50255683 100644
--- a/examples/app/AppHin.gf
+++ b/examples/app/AppHin.gf
@@ -1,47 +1,36 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppHin of App =
- TenseX - [AdN,Adv,SC],
- NounHin - [PPartNP],
- AdjectiveHin,
- NumeralHin,
- SymbolHin [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionHin,
- VerbHin [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbHin,
- PhraseHin,
- SentenceHin [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionHin - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- RelativeHin,
- IdiomHin [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionHin,
-
- ChunkHin,
-
- ExtensionsHin [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
-
- DocumentationHin,
- DictionaryHin
+ TranslateHin - [
+ -- 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
+ ]
,PhrasebookHin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
- ** open MorphoHin, ResHin, ParadigmsHin, SyntaxHin, CommonScand, (E = ExtraHin), Prelude in {
+ ** open ParadigmsHin, SyntaxHin, Prelude in {
flags
literal=Symb ;
@@ -50,13 +39,9 @@ flags
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 ;
}
diff --git a/examples/app/AppIta.gf b/examples/app/AppIta.gf
index 143a66fdd..9df6a8a00 100644
--- a/examples/app/AppIta.gf
+++ b/examples/app/AppIta.gf
@@ -1,62 +1,46 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppIta of App =
- TenseIta,
- NounIta - [PPartNP],
- AdjectiveIta,
- NumeralIta,
- SymbolIta [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionIta,
- VerbIta [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbIta,
- PhraseIta,
- SentenceIta [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionIta - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- RelativeIta,
- IdiomIta [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionIta,
- ChunkIta,
-
- ExtensionsIta [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
-
- DocumentationIta,
- DictionaryIta
-
- ,PhrasebookIta - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A]
-
- ** open MorphoIta, ResIta, ParadigmsIta, SyntaxIta, CommonScand, (E = ExtraIta), Prelude in {
+ TranslateIta - [
+ -- 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
+ ]
+
+ ,PhrasebookIta - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
+
+ ** open ParadigmsIta, SyntaxIta, 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) ;
-
-
-lin
PhrasePhr p = {s = "+" ++ p.s} | p ;
-
Phrase_Chunk p = p ;
}
diff --git a/examples/app/AppSpa.gf b/examples/app/AppSpa.gf
index 9cd6c551c..b1d147977 100644
--- a/examples/app/AppSpa.gf
+++ b/examples/app/AppSpa.gf
@@ -1,47 +1,37 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppSpa of App =
- TenseSpa,
- NounSpa - [PPartNP],
- AdjectiveSpa,
- NumeralSpa,
- SymbolSpa [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionSpa,
- VerbSpa [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbSpa,
- PhraseSpa,
- SentenceSpa [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionSpa - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- RelativeSpa,
- IdiomSpa [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionSpa,
- ChunkSpa,
-
- ExtensionsSpa [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
-
- DocumentationSpa,
- DictionarySpa
-
- ,PhrasebookSpa - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A]
-
- ** open MorphoSpa, ResSpa, ParadigmsSpa, SyntaxSpa, CommonScand, (E = ExtraSpa), Prelude in {
+ TranslateSpa - [
+ -- 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
+ ]
+
+ ,PhrasebookSpa - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A, closed_A]
+
+ ** open ParadigmsSpa, SyntaxSpa, Prelude in {
flags
literal=Symb ;
@@ -50,13 +40,8 @@ flags
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 ;
}
diff --git a/examples/app/AppSwe.gf b/examples/app/AppSwe.gf
index 1d32e0184..6a8f2dc2b 100644
--- a/examples/app/AppSwe.gf
+++ b/examples/app/AppSwe.gf
@@ -1,43 +1,32 @@
--# -path=.:src/chunk:src/translator:../examples/phrasebook/gfos
concrete AppSwe of App =
- TenseSwe,
- NounSwe - [PPartNP],
- AdjectiveSwe,
- NumeralSwe,
- SymbolSwe [
- PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP
- ],
- ConjunctionSwe,
- VerbSwe [
- UseV,ComplVV,SlashV2a,ComplSlash,UseComp,CompAP,CompNP,CompAdv,CompCN
- ,AdvVP,AdVVP
- ],
- AdverbSwe,
- PhraseSwe,
- SentenceSwe [
- PredVP,SlashVP,ImpVP,AdvS,
- UseCl,UseQCl,UseSlash,SSubjS,UseRCl
- ],
- QuestionSwe - [
- ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP
- ],
- RelativeSwe,
- IdiomSwe [
- NP, VP, Tense, Cl, ProgrVP, ExistNP,
- neutr, sjalv
- ],
----- ConstructionSwe,
-
- ChunkSwe,
-
- ExtensionsSwe [
- CompoundCN,AdAdV,UttAdV,ApposNP,
- MkVPI, MkVPS, PredVPS, that_RP, who_RP
- ],
-
- DocumentationSwe,
- DictionarySwe
+ TranslateSwe - [
+ -- 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
+ ]
,PhrasebookSwe - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
@@ -50,13 +39,8 @@ flags
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 ;
}