mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-11 05:49:31 -06:00
App.gf: an experiment in combining phrasebook, rgl, and chunking, to support three colours in an app to indicate translation confidence
This commit is contained in:
13
lib/src/experimental/App.gf
Normal file
13
lib/src/experimental/App.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
--# -path=.:../translator:../../../examples/phrasebook
|
||||
|
||||
abstract App =
|
||||
NDTrans
|
||||
, Phrasebook
|
||||
** {
|
||||
flags
|
||||
startcat=Phr;
|
||||
|
||||
fun
|
||||
PhrasePhr : Phrase -> Phr ;
|
||||
|
||||
}
|
||||
14
lib/src/experimental/AppChi.gf
Normal file
14
lib/src/experimental/AppChi.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
--# -path=.:../translator:../../../examples/phrasebook
|
||||
|
||||
concrete AppChi of App =
|
||||
NDTransChi
|
||||
, PhrasebookChi - [Ant,Pol,Tense,at_Prep]
|
||||
** {
|
||||
|
||||
flags
|
||||
literal = Symb ;
|
||||
|
||||
lin
|
||||
PhrasePhr p = {s = "+" ++ p.s} | p ;
|
||||
|
||||
}
|
||||
14
lib/src/experimental/AppEng.gf
Normal file
14
lib/src/experimental/AppEng.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
--# -path=.:../translator:../../../examples/phrasebook
|
||||
|
||||
concrete AppEng of App =
|
||||
NDTransEng
|
||||
, PhrasebookEng
|
||||
** {
|
||||
|
||||
flags
|
||||
literal = Symb ;
|
||||
|
||||
lin
|
||||
PhrasePhr p = {s = "+" ++ p.s} | p ;
|
||||
|
||||
}
|
||||
14
lib/src/experimental/AppFin.gf
Normal file
14
lib/src/experimental/AppFin.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
--# -path=.:../finnish/stemmed:../finnish:../api:../translator:../../../examples/phrasebook:alltenses
|
||||
|
||||
concrete AppFin of App =
|
||||
NDTransFin
|
||||
, PhrasebookFin
|
||||
** {
|
||||
|
||||
flags
|
||||
literal = Symb ;
|
||||
|
||||
lin
|
||||
PhrasePhr p = {s = "+" ++ p.s} | p ;
|
||||
|
||||
}
|
||||
14
lib/src/experimental/AppSwe.gf
Normal file
14
lib/src/experimental/AppSwe.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
--# -path=.:../translator:../../../examples/phrasebook
|
||||
|
||||
concrete AppSwe of App =
|
||||
NDTransSwe
|
||||
, PhrasebookSwe - [open_A]
|
||||
** {
|
||||
|
||||
flags
|
||||
literal = Symb ;
|
||||
|
||||
lin
|
||||
PhrasePhr p = {s = "+" ++ p.s} | p ;
|
||||
|
||||
}
|
||||
@@ -7,3 +7,10 @@ bigtranslator:
|
||||
midtranslator:
|
||||
gf -s -make -literal=Symb -probs=NDPredTrans.probs -name=TransEngChiSwe NDTransEng.gf NDTransSwe.gf NDTransChi.gf +RTS -K200M
|
||||
|
||||
|
||||
|
||||
app:
|
||||
gf -s -make -literal=Symb -probs=NDPredTrans.probs -name=AppEngSwe AppEng.gf AppSwe.gf
|
||||
bigapp:
|
||||
gf -s -make -literal=Symb -probs=NDPredTrans.probs -name=AppEngChiFinSwe AppEng.gf AppSwe.gf AppChi.gf AppFin.gf +RTS -K200M
|
||||
|
||||
|
||||
@@ -65287,10 +65287,11 @@ V_np_s_pastpart_Chunk 0.001
|
||||
V_np_v_pastpart_Chunk 0.01
|
||||
V_np_a_pastpart_Chunk 0.001
|
||||
V_np_q_pastpart_Chunk 0.001
|
||||
PhrUtt 0.99
|
||||
PhrChunk 0.01
|
||||
OneChunk 0.8
|
||||
PlusChunk 0.2
|
||||
PhrasePhr 0.8
|
||||
PhrUtt 0.19
|
||||
PhrChunk 0.01
|
||||
OneChunk 0.8
|
||||
PlusChunk 0.2
|
||||
refl_SgP1_Chunk 5.751177721092363e-4
|
||||
refl_SgP2_Chunk 5.751177721092363e-4
|
||||
refl_SgP3_Chunk 5.751177721092363e-4
|
||||
|
||||
Reference in New Issue
Block a user