From 96087ea21db4530d2b0856eb5b02d3fe97399180 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 10 Mar 2014 18:00:53 +0000 Subject: [PATCH] App.gf: an experiment in combining phrasebook, rgl, and chunking, to support three colours in an app to indicate translation confidence --- lib/src/experimental/App.gf | 13 +++++++++++++ lib/src/experimental/AppChi.gf | 14 ++++++++++++++ lib/src/experimental/AppEng.gf | 14 ++++++++++++++ lib/src/experimental/AppFin.gf | 14 ++++++++++++++ lib/src/experimental/AppSwe.gf | 14 ++++++++++++++ lib/src/experimental/Makefile | 7 +++++++ lib/src/experimental/NDPredTrans.probs | 9 +++++---- 7 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 lib/src/experimental/App.gf create mode 100644 lib/src/experimental/AppChi.gf create mode 100644 lib/src/experimental/AppEng.gf create mode 100644 lib/src/experimental/AppFin.gf create mode 100644 lib/src/experimental/AppSwe.gf diff --git a/lib/src/experimental/App.gf b/lib/src/experimental/App.gf new file mode 100644 index 000000000..9f3b79210 --- /dev/null +++ b/lib/src/experimental/App.gf @@ -0,0 +1,13 @@ +--# -path=.:../translator:../../../examples/phrasebook + +abstract App = + NDTrans + , Phrasebook + ** { +flags + startcat=Phr; + +fun + PhrasePhr : Phrase -> Phr ; + +} diff --git a/lib/src/experimental/AppChi.gf b/lib/src/experimental/AppChi.gf new file mode 100644 index 000000000..5672a7cfb --- /dev/null +++ b/lib/src/experimental/AppChi.gf @@ -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 ; + +} \ No newline at end of file diff --git a/lib/src/experimental/AppEng.gf b/lib/src/experimental/AppEng.gf new file mode 100644 index 000000000..4efc4e453 --- /dev/null +++ b/lib/src/experimental/AppEng.gf @@ -0,0 +1,14 @@ +--# -path=.:../translator:../../../examples/phrasebook + +concrete AppEng of App = + NDTransEng + , PhrasebookEng + ** { + +flags + literal = Symb ; + +lin + PhrasePhr p = {s = "+" ++ p.s} | p ; + +} \ No newline at end of file diff --git a/lib/src/experimental/AppFin.gf b/lib/src/experimental/AppFin.gf new file mode 100644 index 000000000..d5f0e1eee --- /dev/null +++ b/lib/src/experimental/AppFin.gf @@ -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 ; + +} \ No newline at end of file diff --git a/lib/src/experimental/AppSwe.gf b/lib/src/experimental/AppSwe.gf new file mode 100644 index 000000000..56fb8f19c --- /dev/null +++ b/lib/src/experimental/AppSwe.gf @@ -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 ; + +} \ No newline at end of file diff --git a/lib/src/experimental/Makefile b/lib/src/experimental/Makefile index e6ba5444a..8566cf961 100644 --- a/lib/src/experimental/Makefile +++ b/lib/src/experimental/Makefile @@ -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 + diff --git a/lib/src/experimental/NDPredTrans.probs b/lib/src/experimental/NDPredTrans.probs index a84eb22f7..e6e45ebbe 100644 --- a/lib/src/experimental/NDPredTrans.probs +++ b/lib/src/experimental/NDPredTrans.probs @@ -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