mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -06:00
commented out the import of Phrasebook in App with --P; the idea is that application grammar parsing is done in a separate phase, which is faster and more flexible. Also re-enabled ComplV3 and ComplV2V, after testing that they don't reduce the parsing speed too much.
This commit is contained in:
@@ -22,7 +22,7 @@ abstract App =
|
|||||||
-- Extensions
|
-- Extensions
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
,Phrasebook
|
--P ,Phrasebook
|
||||||
|
|
||||||
** {
|
** {
|
||||||
flags
|
flags
|
||||||
@@ -30,19 +30,17 @@ flags
|
|||||||
heuristic_search_factor=0.80; -- doesn't seem to affect speed or quality much
|
heuristic_search_factor=0.80; -- doesn't seem to affect speed or quality much
|
||||||
|
|
||||||
fun
|
fun
|
||||||
PhrasePhr : Phrase -> Phr ;
|
--P PhrasePhr : Phrase -> Phr ;
|
||||||
Phrase_Chunk : Phrase -> Chunk ;
|
--P Phrase_Chunk : Phrase -> Chunk ;
|
||||||
|
|
||||||
ComplV2 : V2 -> NP -> VP ;
|
ComplV2 : V2 -> NP -> VP ;
|
||||||
PassV2 : V2 -> VP ;
|
PassV2 : V2 -> VP ;
|
||||||
|
|
||||||
|
|
||||||
{-
|
|
||||||
ComplV2V : V2V -> NP -> VP -> VP ;
|
ComplV2V : V2V -> NP -> VP -> VP ;
|
||||||
ComplV2A : V2A -> NP -> AP -> VP ;
|
-- ComplV2A : V2A -> NP -> AP -> VP ;
|
||||||
ComplV2Q : V2Q -> NP -> QS -> VP ;
|
-- ComplV2Q : V2Q -> NP -> QS -> VP ;
|
||||||
ComplV2S : V2S -> NP -> S -> VP ;
|
-- ComplV2S : V2S -> NP -> S -> VP ;
|
||||||
|
|
||||||
ComplV3 : V3 -> NP -> NP -> VP ;
|
ComplV3 : V3 -> NP -> NP -> VP ;
|
||||||
-}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppBul of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookBul - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
--P ,PhrasebookBul - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
||||||
|
|
||||||
** open ParadigmsBul, SyntaxBul, Prelude in {
|
** open ParadigmsBul, SyntaxBul, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ concrete AppCat of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookCat - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A, closed_A]
|
--P ,PhrasebookCat - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A, closed_A]
|
||||||
|
|
||||||
** open ParadigmsCat, SyntaxCat, Prelude in {
|
** open ParadigmsCat, SyntaxCat, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppChi of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookChi - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
|
--P ,PhrasebookChi - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
|
||||||
|
|
||||||
** open ParadigmsChi, SyntaxChi, Prelude in {
|
** open ParadigmsChi, SyntaxChi, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppDut of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookDut - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
--P ,PhrasebookDut - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
||||||
|
|
||||||
** open ParadigmsDut, SyntaxDut, Prelude in {
|
** open ParadigmsDut, SyntaxDut, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppEng of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookEng - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv]
|
--P ,PhrasebookEng - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv]
|
||||||
|
|
||||||
** open MorphoEng, ResEng, ParadigmsEng, SyntaxEng, (G = GrammarEng), (E = ExtraEng), Prelude in {
|
** open MorphoEng, ResEng, ParadigmsEng, SyntaxEng, (G = GrammarEng), (E = ExtraEng), Prelude in {
|
||||||
|
|
||||||
@@ -33,21 +33,21 @@ flags
|
|||||||
|
|
||||||
-- to suppress punctuation
|
-- to suppress punctuation
|
||||||
lin
|
lin
|
||||||
PSentence, PQuestion = \s -> lin Text (mkUtt s) ;
|
--P PSentence, PQuestion = \s -> lin Text (mkUtt s) ;
|
||||||
PGreetingMale, PGreetingFemale = \s -> lin Text s ;
|
--P PGreetingMale, PGreetingFemale = \s -> lin Text s ;
|
||||||
GObjectPlease o = lin Text (mkUtt o) ;
|
--P GObjectPlease o = lin Text (mkUtt o) ;
|
||||||
PhrasePhr p = {s = "+" ++ p.s} | p ;
|
--P PhrasePhr p = {s = "+" ++ p.s} | p ;
|
||||||
Phrase_Chunk p = p ;
|
--P Phrase_Chunk p = p ;
|
||||||
|
|
||||||
ComplV2V v np vp = mkVP v np vp ;
|
ComplV2V v np vp = mkVP v np vp ;
|
||||||
ComplV2A v np vp = mkVP v np vp ;
|
-- ComplV2A v np vp = mkVP v np vp ;
|
||||||
ComplV2Q v np vp = mkVP v np vp ;
|
-- ComplV2Q v np vp = mkVP v np vp ;
|
||||||
ComplV2S v np vp = mkVP v np vp ;
|
-- ComplV2S v np vp = mkVP v np vp ;
|
||||||
ComplV3 v np vp = mkVP v np vp ;
|
ComplV3 v np vp = mkVP v np vp ;
|
||||||
|
|
||||||
|
|
||||||
ComplV2 v np = mkVP v np ;
|
ComplV2 v np = mkVP v np ;
|
||||||
|
|
||||||
PassV2 v2 = passiveVP v2 ;
|
PassV2 v2 = passiveVP v2 ;
|
||||||
PassV2 v2 = passiveVP v2 ;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppEst of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookEst - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, open_Adv]
|
--P ,PhrasebookEst - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, open_Adv]
|
||||||
|
|
||||||
** open ParadigmsEst, SyntaxEst, Prelude in {
|
** open ParadigmsEst, SyntaxEst, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppFin of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookFin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, open_Adv]
|
--P ,PhrasebookFin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, open_Adv]
|
||||||
|
|
||||||
** open ParadigmsFin, SyntaxFin, Prelude in {
|
** open ParadigmsFin, SyntaxFin, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ concrete AppFre of App =
|
|||||||
-- Extensions
|
-- Extensions
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
,PhrasebookFre - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
|
--P ,PhrasebookFre - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
|
||||||
|
|
||||||
** open ParadigmsFre, SyntaxFre, Prelude in {
|
** open ParadigmsFre, SyntaxFre, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppGer of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookGer - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
--P ,PhrasebookGer - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
||||||
|
|
||||||
** open ParadigmsGer, SyntaxGer, Prelude in {
|
** open ParadigmsGer, SyntaxGer, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ concrete AppHin of App =
|
|||||||
-- Extensions
|
-- Extensions
|
||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
,PhrasebookHin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
--P ,PhrasebookHin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
||||||
|
|
||||||
** open ParadigmsHin, SyntaxHin, Prelude in {
|
** open ParadigmsHin, SyntaxHin, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppIta of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookIta - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
|
--P ,PhrasebookIta - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A]
|
||||||
|
|
||||||
** open ParadigmsIta, SyntaxIta, Prelude in {
|
** open ParadigmsIta, SyntaxIta, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppJpn of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookJpn ---- - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
|
--P ,PhrasebookJpn ---- - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
|
||||||
|
|
||||||
** open ParadigmsJpn, SyntaxJpn, Prelude in {
|
** open ParadigmsJpn, SyntaxJpn, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppRus of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookRus - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, cost_V]
|
--P ,PhrasebookRus - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, cost_V]
|
||||||
|
|
||||||
** open ParadigmsRus, SyntaxRus, Prelude in {
|
** open ParadigmsRus, SyntaxRus, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ concrete AppSpa of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookSpa - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A, closed_A]
|
--P ,PhrasebookSpa - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A, closed_A]
|
||||||
|
|
||||||
** open ParadigmsSpa, SyntaxSpa, Prelude in {
|
** open ParadigmsSpa, SyntaxSpa, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ concrete AppSwe of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookSwe - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
--P ,PhrasebookSwe - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A]
|
||||||
|
|
||||||
** open MorphoSwe, ResSwe, ParadigmsSwe, SyntaxSwe, CommonScand, (E = ExtraSwe), Prelude in {
|
** open MorphoSwe, ResSwe, ParadigmsSwe, SyntaxSwe, CommonScand, (E = ExtraSwe), Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete AppTha of App =
|
|||||||
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
PassVPSlash, PassAgentVPSlash -- not reachable anyway
|
||||||
]
|
]
|
||||||
|
|
||||||
,PhrasebookTha - [at_Prep, closed_A, open_A] --- - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep, by_Prep]
|
--P ,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 {
|
** open ParadigmsTha, SyntaxTha, Prelude in {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
all: Phrasebook App15.pgf
|
all: App15.pgf
|
||||||
|
|
||||||
PROBSFILE=./app.probs
|
PROBSFILE=./app.probs
|
||||||
GFODIR=./gfos
|
GFODIR=./gfos
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
-- the new files are produced in ./tmp/ which has to be created first
|
-- the new files are produced in ./tmp/ which has to be created first
|
||||||
-- usage: runghc MkApp.hs
|
-- usage: runghc MkApp.hs
|
||||||
|
|
||||||
langs = words "Bul Cat Chi Dut Eng Fin Fre Ger Hin Ita Jpn Spa Swe Tha"
|
langs = words "Bul Cat Chi Dut Eng Est Fin Fre Ger Hin Ita Jpn Spa Swe Tha"
|
||||||
appCnc lang = "App" ++ lang ++ ".gf"
|
appCnc lang = "App" ++ lang ++ ".gf"
|
||||||
|
|
||||||
appAbs = "App.gf"
|
appAbs = "App.gf"
|
||||||
@@ -23,5 +23,5 @@ putImports i s =
|
|||||||
extra s = unlines (init (lines s) ++ extraLines ++ ["}"])
|
extra s = unlines (init (lines s) ++ extraLines ++ ["}"])
|
||||||
|
|
||||||
extraLines = [
|
extraLines = [
|
||||||
" PassV2 v2 = passiveVP v2 ;"
|
-- " PassV2 v2 = passiveVP v2 ;"
|
||||||
] -- default: no extra
|
] -- default: no extra
|
||||||
|
|||||||
Reference in New Issue
Block a user