mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
Merge branch 'master' of https://github.com/GrammaticalFramework/GF
This commit is contained in:
@@ -1,49 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
abstract App =
|
|
||||||
Translate - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
]
|
|
||||||
,Phrasebook
|
|
||||||
|
|
||||||
** {
|
|
||||||
flags
|
|
||||||
startcat=Phr ;
|
|
||||||
heuristic_search_factor=0.80; -- doesn't seem to affect speed or quality much
|
|
||||||
|
|
||||||
fun
|
|
||||||
PhrasePhr : Phrase -> Phr ;
|
|
||||||
Phrase_Chunk : Phrase -> Chunk ;
|
|
||||||
|
|
||||||
ComplV2 : V2 -> NP -> VP ; -- sees him
|
|
||||||
|
|
||||||
ComplV2V : V2V -> NP -> VP -> VP ; -- forces him to leave
|
|
||||||
-- ComplV2A : V2A -> NP -> AP -> VP ;
|
|
||||||
-- ComplV2Q : V2Q -> NP -> QS -> VP ;
|
|
||||||
-- ComplV2S : V2S -> NP -> S -> VP ;
|
|
||||||
ComplV3 : V3 -> NP -> NP -> VP ; -- gives him an apple
|
|
||||||
|
|
||||||
PassV2 : V2 -> VP ; -- is seen
|
|
||||||
PassAgentV2 : V2 -> NP -> VP ; -- is seen by her
|
|
||||||
RelV2 : RP -> NP -> V2 -> RCl ; -- that she sees
|
|
||||||
QuestV2 : IP -> NP -> V2 -> QCl ; -- whom does she see
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppBul of App =
|
|
||||||
|
|
||||||
TranslateBul - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookBul - [open_Adv,closed_A,open_A]
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxBul) ;
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppCat of App =
|
|
||||||
|
|
||||||
TranslateCat - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
]
|
|
||||||
,PhrasebookCat - [open_Adv,closed_A,open_A,at_Prep,cheap_A,expensive_A,stateCopula]
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxCat) ;
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppChi of App =
|
|
||||||
|
|
||||||
TranslateChi - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookChi - [open_Adv,closed_A,open_A,at_Prep,by_Prep]
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxChi) ;
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppDut of App =
|
|
||||||
|
|
||||||
TranslateDut - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookDut - [open_Adv,closed_A,open_A]
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxDut) ;
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppEng of App =
|
|
||||||
|
|
||||||
TranslateEng - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookEng - [open_Adv]
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxEng) ;
|
|
||||||
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../../lib/src/estonian:../phrasebook/gfos:alltenses
|
|
||||||
|
|
||||||
concrete AppEst of App =
|
|
||||||
|
|
||||||
TranslateEst - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
]
|
|
||||||
,PhrasebookEst - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxEst) ;
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/finnish/stemmed:../../lib/src/finnish:../../lib/src/api:../../lib/src/translator:../phrasebook/gfos:alltenses
|
|
||||||
|
|
||||||
concrete AppFin of App =
|
|
||||||
|
|
||||||
TranslateFin - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookFin - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxFin) ;
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppFre of App =
|
|
||||||
TranslateFre - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
]
|
|
||||||
,PhrasebookFre - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxFre) ;
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
incomplete concrete AppFunctor of App =
|
|
||||||
|
|
||||||
Translate - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
Phrasebook - [open_Adv]
|
|
||||||
|
|
||||||
** open Syntax in {
|
|
||||||
|
|
||||||
flags
|
|
||||||
literal=Symb ;
|
|
||||||
-- case_sensitive=off ;
|
|
||||||
|
|
||||||
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 ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PassV2 v2 = passiveVP v2 ;
|
|
||||||
PassAgentV2 v2 np = mkVP (passiveVP v2) (mkAdv by8agent_Prep np) ;
|
|
||||||
RelV2 rp np v2 = mkRCl rp (mkClSlash np (mkVPSlash v2)) ;
|
|
||||||
QuestV2 ip np v2 = mkQCl ip (mkClSlash np (mkVPSlash v2)) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos:alltenses::../../lib/src/german
|
|
||||||
|
|
||||||
concrete AppGer of App =
|
|
||||||
|
|
||||||
TranslateGer - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookGer - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxGer) ;
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppHin of App =
|
|
||||||
|
|
||||||
TranslateHin - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookHin - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxHin) ;
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppIta of App =
|
|
||||||
|
|
||||||
TranslateIta - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
]
|
|
||||||
,PhrasebookIta - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxIta) ;
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppJpn of App =
|
|
||||||
|
|
||||||
TranslateJpn - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookJpn - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxJpn) ;
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppRus of App =
|
|
||||||
|
|
||||||
TranslateRus - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
]
|
|
||||||
,PhrasebookRus - [open_Adv,closed_A,open_A,at_Prep,cost_V]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxRus) ;
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
|
|
||||||
concrete AppSpa of App =
|
|
||||||
|
|
||||||
TranslateSpa - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
]
|
|
||||||
,PhrasebookSpa - [open_Adv,closed_A,open_A,at_Prep,cheap_A,expensive_A,stateCopula]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxSpa) ;
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppSwe of App =
|
|
||||||
TranslateSwe - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookSwe - [open_Adv,closed_A,open_A]
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxSwe) ;
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppTha of App =
|
|
||||||
|
|
||||||
TranslateTha - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookTha - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxTha) ;
|
|
||||||
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppUrd of App =
|
|
||||||
|
|
||||||
TranslateUrd - [
|
|
||||||
-- Verb
|
|
||||||
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,
|
|
||||||
-- Question
|
|
||||||
ComplSlashIP,AdvQVP,AddAdvQVP,QuestQVP,
|
|
||||||
-- Idiom
|
|
||||||
CleftNP, CleftAdv,
|
|
||||||
ImpP3,
|
|
||||||
-- Construction
|
|
||||||
-- Extensions
|
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
|
||||||
],
|
|
||||||
PhrasebookUrd - [open_Adv,closed_A,open_A,at_Prep]
|
|
||||||
|
|
||||||
|
|
||||||
** AppFunctor with (Syntax = SyntaxUrd) ;
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
all: App16.pgf
|
|
||||||
|
|
||||||
PROBSFILE=./app.probs
|
|
||||||
GFODIR=./gfos
|
|
||||||
|
|
||||||
.Phony: Phrasebook
|
|
||||||
|
|
||||||
Phrasebook:
|
|
||||||
cd ../phrasebook ; make forApp ; cd ../app
|
|
||||||
|
|
||||||
S=-s
|
|
||||||
GFMKT=mkdir -p $(GFODIR) && gf $S -make -literal=PN,Symb -probs=$(PROBSFILE) -gfo-dir $(GFODIR)
|
|
||||||
|
|
||||||
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
|
|
||||||
APP15=$(APP14) AppEst.pgf
|
|
||||||
APP16=$(APP15) AppRus.pgf
|
|
||||||
APP17=$(APP16) AppUrd.pgf
|
|
||||||
|
|
||||||
# With dependencies:
|
|
||||||
App11.pgf: $(APP11)
|
|
||||||
$(GFMKT) -name=App11 $(APP11) +RTS -K200M
|
|
||||||
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
|
|
||||||
App15.pgf: $(APP15)
|
|
||||||
$(GFMKT) -name=App15 $(APP15) +RTS -K200M
|
|
||||||
App16.pgf: $(APP16)
|
|
||||||
$(GFMKT) -name=App16 $(APP16) +RTS -K200M
|
|
||||||
|
|
||||||
App17.pgf: $(APP17)
|
|
||||||
$(GFMKT) -name=App16 $(APP17) +RTS -K200M
|
|
||||||
|
|
||||||
# Without dependencies:
|
|
||||||
App11:
|
|
||||||
$(GFMKT) -name=App11 $(APP11) +RTS -K200M
|
|
||||||
App12:
|
|
||||||
$(GFMKT) -name=App12 $(APP12) +RTS -K200M
|
|
||||||
App13:
|
|
||||||
$(GFMKT) -name=App13 $(APP13) +RTS -K200M
|
|
||||||
App14:
|
|
||||||
$(GFMKT) -name=App14 $(APP14) +RTS -K200M
|
|
||||||
App15:
|
|
||||||
$(GFMKT) -name=App15 $(APP15) +RTS -K200M
|
|
||||||
App16:
|
|
||||||
$(GFMKT) -name=App16 $(APP16) +RTS -K200M
|
|
||||||
|
|
||||||
# App grammars for individual languages
|
|
||||||
AppEng.pgf:: ; $(GFMKT) -name=AppEng AppEng.gf
|
|
||||||
AppBul.pgf:: ; $(GFMKT) -name=AppBul AppBul.gf
|
|
||||||
AppCat.pgf:: ; $(GFMKT) -name=AppCat AppCat.gf +RTS -K100M
|
|
||||||
AppChi.pgf:: ; $(GFMKT) -name=AppChi AppChi.gf +RTS -K100M
|
|
||||||
AppDut.pgf:: ; $(GFMKT) -name=AppDut AppDut.gf +RTS -K64M
|
|
||||||
AppEst.pgf:: ; $(GFMKT) -name=AppEst AppEst.gf +RTS -K64M
|
|
||||||
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
|
|
||||||
AppUrd.pgf:: ; $(GFMKT) -name=AppUrd AppUrd.gf
|
|
||||||
AppFre.pgf:: ; $(GFMKT) -name=AppFre AppFre.gf +RTS -K64M
|
|
||||||
AppIta.pgf:: ; $(GFMKT) -name=AppIta AppIta.gf +RTS -K64M
|
|
||||||
AppJpn.pgf:: ; $(GFMKT) -name=AppJpn AppJpn.gf +RTS -K64M
|
|
||||||
AppRus.pgf:: ; $(GFMKT) -name=AppRus AppRus.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
|
|
||||||
AppEngFin: ; $(GFMKT) -name=AppEngFin AppEng.pgf AppFin.pgf
|
|
||||||
AppEngChi: ; $(GFMKT) -name=AppEngChi AppEng.pgf AppChi.pgf
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
-- update the import list of every language
|
|
||||||
-- although possibly some extra definitions at the end
|
|
||||||
-- the new files are produced in ./tmp/ which has to be created first
|
|
||||||
-- usage: runghc MkApp.hs
|
|
||||||
|
|
||||||
langs = words "Bul Cat Chi Dut Eng Est Fin Fre Ger Hin Ita Jpn Spa Swe Tha"
|
|
||||||
appCnc lang = "App" ++ lang ++ ".gf"
|
|
||||||
|
|
||||||
appAbs = "App.gf"
|
|
||||||
|
|
||||||
main = do
|
|
||||||
imports <- readFile appAbs >>= return . getImports
|
|
||||||
mapM_ (\f -> readFile f >>= writeFile ("tmp/" ++ f) . (putImports imports)) (map appCnc langs)
|
|
||||||
|
|
||||||
getImports = takeWhile (/= ']') . tail . dropWhile (/='[')
|
|
||||||
|
|
||||||
putImports i s =
|
|
||||||
let
|
|
||||||
(s1,_:s2) = span (/='[') s
|
|
||||||
(_, s3) = span (/=']') s2
|
|
||||||
in s1 ++ "[" ++ i ++ extra s3
|
|
||||||
|
|
||||||
extra s = unlines (init (lines s) ++ extraLines ++ ["}"])
|
|
||||||
|
|
||||||
extraLines = [
|
|
||||||
-- " PassV2 v2 = passiveVP v2 ;"
|
|
||||||
] -- default: no extra
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
James and Mary are in the garden
|
|
||||||
the weather is nice today
|
|
||||||
it is very warm
|
|
||||||
but yesterday it was very cold
|
|
||||||
they could not play outside then
|
|
||||||
James and Mary love to play
|
|
||||||
they always play together in the garden in front of the big house
|
|
||||||
James is a little boy and he is six years old
|
|
||||||
the little girl is his sister
|
|
||||||
she is five years old
|
|
||||||
James has a small dog
|
|
||||||
the dog is also in the garden now
|
|
||||||
the dog likes to play with the two children
|
|
||||||
the dog is very happy now
|
|
||||||
does Mary also have a dog
|
|
||||||
no , Mary does not have a dog
|
|
||||||
she has a cat
|
|
||||||
but the cat is in the house
|
|
||||||
the cat is sleeping
|
|
||||||
their mother is inside the house with the cat
|
|
||||||
she looks through the window and sees James and Mary playing
|
|
||||||
James quickly runs to a big old tree
|
|
||||||
he is hiding from Mary
|
|
||||||
do you know why
|
|
||||||
Mary is sitting and has her hands in front of her eyes
|
|
||||||
she can't see anything and she is counting
|
|
||||||
why does she do that
|
|
||||||
and what is James doing near the tree
|
|
||||||
65159
examples/app/app.probs
65159
examples/app/app.probs
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
|||||||
je suis ici
|
|
||||||
ma femme est allée a Nice
|
|
||||||
où est la voiture
|
|
||||||
personne ne vous aime
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
abstract App =
|
|
||||||
Translate - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
,Phrasebook
|
|
||||||
|
|
||||||
** {
|
|
||||||
flags
|
|
||||||
startcat=Phr ;
|
|
||||||
heuristic_search_factor=0.80; -- doesn't seem to affect speed or quality much
|
|
||||||
|
|
||||||
fun
|
|
||||||
PhrasePhr : Phrase -> Phr ;
|
|
||||||
Phrase_Chunk : Phrase -> Chunk ;
|
|
||||||
|
|
||||||
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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppBul of App =
|
|
||||||
|
|
||||||
TranslateBul - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookBul - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
|
||||||
|
|
||||||
** open ParadigmsBul, SyntaxBul, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
|
|
||||||
concrete AppCat of App =
|
|
||||||
|
|
||||||
TranslateCat - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookCat - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A, closed_A]
|
|
||||||
|
|
||||||
** open ParadigmsCat, SyntaxCat, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppChi of App =
|
|
||||||
|
|
||||||
TranslateChi - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookChi - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
|
|
||||||
|
|
||||||
** open ParadigmsChi, SyntaxChi, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppDut of App =
|
|
||||||
|
|
||||||
TranslateDut - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookDut - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
|
||||||
|
|
||||||
** open ParadigmsDut, SyntaxDut, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppEng of App =
|
|
||||||
|
|
||||||
TranslateEng - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookEng - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv]
|
|
||||||
|
|
||||||
** open MorphoEng, ResEng, ParadigmsEng, SyntaxEng, (G = GrammarEng), (E = ExtraEng), 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/finnish/stemmed:../../lib/src/finnish:../../lib/src/api:../../lib/src/translator:../phrasebook/gfos:alltenses
|
|
||||||
|
|
||||||
concrete AppFin of App =
|
|
||||||
|
|
||||||
TranslateFin - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookFin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, open_Adv]
|
|
||||||
|
|
||||||
** open ParadigmsFin, SyntaxFin, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppFre of App =
|
|
||||||
|
|
||||||
TranslateFre - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
,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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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 ;
|
|
||||||
-}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos:alltenses::../../lib/src/german
|
|
||||||
|
|
||||||
concrete AppGer of App =
|
|
||||||
|
|
||||||
TranslateGer - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookGer - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
|
||||||
|
|
||||||
** open ParadigmsGer, SyntaxGer, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppHin of App =
|
|
||||||
|
|
||||||
TranslateHin - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
,PhrasebookHin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
|
||||||
|
|
||||||
** open ParadigmsHin, SyntaxHin, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppIta of App =
|
|
||||||
|
|
||||||
TranslateIta - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookIta - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
|
|
||||||
|
|
||||||
** open ParadigmsIta, SyntaxIta, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppJpn of App =
|
|
||||||
|
|
||||||
TranslateJpn - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookJpn ---- - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
|
|
||||||
|
|
||||||
** open ParadigmsJpn, SyntaxJpn, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
|
|
||||||
concrete AppSpa of App =
|
|
||||||
|
|
||||||
TranslateSpa - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookSpa - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A, closed_A]
|
|
||||||
|
|
||||||
** open ParadigmsSpa, SyntaxSpa, 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
--# -path=.:../../lib/src/chunk:../../lib/src/translator:../phrasebook/gfos
|
|
||||||
|
|
||||||
concrete AppSwe of App =
|
|
||||||
TranslateSwe - [
|
|
||||||
-- 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
|
|
||||||
]
|
|
||||||
|
|
||||||
,PhrasebookSwe - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
|
||||||
|
|
||||||
** open MorphoSwe, ResSwe, ParadigmsSwe, SyntaxSwe, CommonScand, (E = ExtraSwe), 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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
--# -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 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
all: Phrasebook App12.pgf
|
|
||||||
|
|
||||||
PROBSFILE=./app.probs
|
|
||||||
GFODIR=./gfos
|
|
||||||
|
|
||||||
.Phony: Phrasebook
|
|
||||||
|
|
||||||
Phrasebook:
|
|
||||||
cd ../phrasebook ; make forApp ; cd ../app
|
|
||||||
|
|
||||||
S=-s
|
|
||||||
GFMKT=mkdir -p $(GFODIR) && gf $S -make -literal=PN,Symb -probs=$(PROBSFILE) -gfo-dir $(GFODIR)
|
|
||||||
|
|
||||||
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)
|
|
||||||
$(GFMKT) -name=App11 $(APP11) +RTS -K200M
|
|
||||||
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:
|
|
||||||
$(GFMKT) -name=App12 $(APP11) +RTS -K200M
|
|
||||||
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
|
|
||||||
AppBul.pgf:: ; $(GFMKT) -name=AppBul AppBul.gf
|
|
||||||
AppCat.pgf:: ; $(GFMKT) -name=AppCat AppCat.gf +RTS -K100M
|
|
||||||
AppChi.pgf:: ; $(GFMKT) -name=AppChi AppChi.gf +RTS -K100M
|
|
||||||
AppDut.pgf:: ; $(GFMKT) -name=AppDut AppDut.gf +RTS -K64M
|
|
||||||
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
|
|
||||||
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
|
|
||||||
AppEngFin: ; $(GFMKT) -name=AppEngFin AppEng.pgf AppFin.pgf
|
|
||||||
AppEngChi: ; $(GFMKT) -name=AppEngChi AppEng.pgf AppChi.pgf
|
|
||||||
|
|
||||||
@@ -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
|
|
||||||
@@ -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]
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
-- update the import list of every language
|
|
||||||
-- although possibly some extra definitions at the end
|
|
||||||
-- the new files are produced in ./tmp/
|
|
||||||
-- usage: runghc MkApp.hs
|
|
||||||
|
|
||||||
langs = words "Bul Cat Chi Dut Eng Fin Fre Ger Hin Ita Spa Swe"
|
|
||||||
appCnc lang = "App" ++ lang ++ ".gf"
|
|
||||||
|
|
||||||
appAbs = "App.gf"
|
|
||||||
|
|
||||||
main = do
|
|
||||||
imports <- readFile appAbs >>= return . getImports
|
|
||||||
mapM_ (\f -> readFile f >>= writeFile ("tmp/" ++ f) . (putImports imports)) (map appCnc langs)
|
|
||||||
|
|
||||||
getImports = takeWhile (/= ']') . tail . dropWhile (/='[')
|
|
||||||
|
|
||||||
putImports i s =
|
|
||||||
let
|
|
||||||
(s1,_:s2) = span (/='[') s
|
|
||||||
(_, s3) = span (/=']') s2
|
|
||||||
in s1 ++ "[" ++ i ++ extra s3
|
|
||||||
|
|
||||||
extra s = unlines (init (lines s) ++ extraLines ++ ["}"])
|
|
||||||
|
|
||||||
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 ;",
|
|
||||||
""
|
|
||||||
]
|
|
||||||
@@ -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.
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -71,12 +71,9 @@ function sitesearch() {
|
|||||||
<div class=links>
|
<div class=links>
|
||||||
<h4>Develop GF</h4>
|
<h4>Develop GF</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<!--
|
<li><a href="https://travis-ci.org/GrammaticalFramework/GF"><img src="https://travis-ci.org/GrammaticalFramework/GF.svg?branch=master" alt="GF build status"></a>
|
||||||
<li><a href="http://ci.zjyto.net/job/GF/job/Build/"><img src="http://ci.zjyto.net/job/GF/job/Build/badge/icon" alt="GF build status"></a>
|
|
||||||
-->
|
|
||||||
<li><a href="doc/gf-developers.html">GF Developers Guide</a>
|
<li><a href="doc/gf-developers.html">GF Developers Guide</a>
|
||||||
<li><A HREF="https://github.com/GrammaticalFramework/GF/">GF on GitHub</A>
|
<li><A HREF="https://github.com/GrammaticalFramework/">GF on GitHub</A>
|
||||||
<li><A HREF="https://github.com/GrammaticalFramework/gf-contrib/">Contributions GitHub</A>
|
|
||||||
<li><a href="/~hallgren/gf-experiment/browse/">Browse Source Code</a>
|
<li><a href="/~hallgren/gf-experiment/browse/">Browse Source Code</a>
|
||||||
<li><A HREF="doc/gf-people.html">Authors</A>
|
<li><A HREF="doc/gf-people.html">Authors</A>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user