re-enabled Phrasebook in App ; added Russian ; testing with lower-casing the input

This commit is contained in:
aarne
2017-04-11 15:48:18 +00:00
parent 23f740d3b9
commit dd61e1dc19
21 changed files with 52 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ abstract App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
--P ,Phrasebook
,Phrasebook
** {
flags
@@ -30,8 +30,8 @@ flags
heuristic_search_factor=0.80; -- doesn't seem to affect speed or quality much
fun
--P PhrasePhr : Phrase -> Phr ;
--P Phrase_Chunk : Phrase -> Chunk ;
PhrasePhr : Phrase -> Phr ;
Phrase_Chunk : Phrase -> Chunk ;
ComplV2 : V2 -> NP -> VP ; -- sees him

View File

@@ -22,7 +22,8 @@ concrete AppBul of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookBul - [open_Adv,closed_A,open_A]
** AppFunctor with (Syntax = SyntaxBul) ;

View File

@@ -23,5 +23,6 @@ concrete AppCat of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookCat - [open_Adv,closed_A,open_A,at_Prep,cheap_A,expensive_A,stateCopula]
** AppFunctor with (Syntax = SyntaxCat) ;

View File

@@ -22,6 +22,7 @@ concrete AppChi of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookChi - [open_Adv,closed_A,open_A,at_Prep,by_Prep]
** AppFunctor with (Syntax = SyntaxChi) ;

View File

@@ -22,6 +22,7 @@ concrete AppDut of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookDut - [open_Adv,closed_A,open_A]
** AppFunctor with (Syntax = SyntaxDut) ;

View File

@@ -22,7 +22,8 @@ concrete AppEng of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookEng - [open_Adv]
** AppFunctor with (Syntax = SyntaxEng) ;

View File

@@ -23,5 +23,7 @@ concrete AppEst of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookEst - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxEst) ;

View File

@@ -22,6 +22,8 @@ concrete AppFin of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookFin - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxFin) ;

View File

@@ -22,5 +22,7 @@ concrete AppFre of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookFre - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxFre) ;

View File

@@ -20,14 +20,19 @@ incomplete concrete AppFunctor of App =
-- 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 ;

View File

@@ -22,6 +22,8 @@ concrete AppGer of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookGer - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxGer) ;

View File

@@ -22,6 +22,8 @@ concrete AppHin of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookHin - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxHin) ;

View File

@@ -23,5 +23,7 @@ concrete AppIta of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookIta - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxIta) ;

View File

@@ -22,6 +22,8 @@ concrete AppJpn of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookJpn - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxJpn) ;

View File

@@ -23,5 +23,7 @@ concrete AppRus of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookRus - [open_Adv,closed_A,open_A,at_Prep,cost_V]
** AppFunctor with (Syntax = SyntaxRus) ;

View File

@@ -24,5 +24,7 @@ concrete AppSpa of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookSpa - [open_Adv,closed_A,open_A,at_Prep,cheap_A,expensive_A,stateCopula]
** AppFunctor with (Syntax = SyntaxSpa) ;

View File

@@ -21,6 +21,7 @@ concrete AppSwe of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookSwe - [open_Adv,closed_A,open_A]
** AppFunctor with (Syntax = SyntaxSwe) ;

View File

@@ -22,7 +22,9 @@ concrete AppTha of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookTha - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxTha) ;

View File

@@ -34,7 +34,7 @@ App16.pgf: $(APP16)
# Without dependencies:
App11:
$(GFMKT) -name=App12 $(APP11) +RTS -K200M
$(GFMKT) -name=App11 $(APP11) +RTS -K200M
App12:
$(GFMKT) -name=App12 $(APP12) +RTS -K200M
App13:
@@ -43,6 +43,8 @@ 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

View File

@@ -1,7 +1,7 @@
compile = runghc Compile
forApp:
$(compile) -opt Bul Cat Chi Dut Eng Est Fin Fre Ger Hin Ita Jpn Spa Swe Tha
$(compile) -opt Bul Cat Chi Dut Eng Est Fin Fre Ger Hin Ita Jpn Rus Spa Swe Tha
make gfos
.PHONY: gfos

View File

@@ -41,6 +41,7 @@ public class Translator {
new Language("hi-IN", "Hindi", "AppHin", R.xml.devanagari_page1, R.xml.devanagari_page2),
new Language("it-IT", "Italian", "AppIta", R.xml.qwerty),
new Language("ja-JP", "Japanese","AppJpn", R.xml.qwerty),
new Language("ru-RU", "Russian", "AppRus", R.xml.cyrillic),
new Language("es-ES", "Spanish", "AppSpa", R.xml.qwerty),
new Language("sv-SE", "Swedish", "AppSwe", R.xml.nordic),
new Language("th-TH", "Thai", "AppTha", R.xml.thai_page1, R.xml.thai_page2)