From cfed5c16437f8fdaa6995493b975db89abf458c2 Mon Sep 17 00:00:00 2001 From: pawelk Date: Wed, 23 Apr 2008 05:31:22 +0000 Subject: [PATCH] Poprawione i sprawdzone dystrybulowanie dgp. Pewne pliki (seg.rb, attr.pm) nie sa jeszcze umieszczane we wlasciwym miejscu (teraz sa w bin, a powinny byc w lib/utt). Plik z gramatyka (lib/gram.dgc) zawiera bledy! git-svn-id: svn://atos.wmid.amu.edu.pl/utt@31 e293616e-ec6a-49c2-aa92-f4a8b91c5d16 --- app/src/dgp/Makefile | 3 ++- app/src/dgp/go | 20 +++++++++++++------- app/src/dgp/tre.rb | 2 +- app/src/gph/gph | 4 +++- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/src/dgp/Makefile b/app/src/dgp/Makefile index 996f383..2ffe753 100644 --- a/app/src/dgp/Makefile +++ b/app/src/dgp/Makefile @@ -41,6 +41,7 @@ prof: dgp copy: ifdef UTT_BIN_DIR cp dgp dgc canonize tre.rb $(UTT_BIN_DIR)/ - cp go attr.pm $(UTT_BIN_DIR)/ + # ponizsza linijka jest do usuniecia + cp go attr.pm seg.rb $(UTT_BIN_DIR)/ cp $(LIB_PATH)/*.dgc $(UTT_BIN_DIR)/../lib/utt/ endif diff --git a/app/src/dgp/go b/app/src/dgp/go index 1ddabe5..f9e4329 100755 --- a/app/src/dgp/go +++ b/app/src/dgp/go @@ -1,7 +1,13 @@ -make -f Makefile.go gram.dgp -tok |\ -lem -p W |\ -canonize |\ -sen |\ -gph -p W -p BOS -p EOS -r BOS |\ -dgp -i ds -p W -p BOS -p EOS -g gram.dgp +if test -f Makefile.go; +then + make -f Makefile.go gram.dgp; + tok |\ + lem -p W |\ + canonize |\ + sen |\ + gph -p W -p BOS -p EOS -r BOS |\ + dgp -i ds -p W -p BOS -p EOS -g gram.dgp +else + echo "Invalid configuration! Run utt_make_config.pl first." +fi + diff --git a/app/src/dgp/tre.rb b/app/src/dgp/tre.rb index 87c284b..810d7ee 100755 --- a/app/src/dgp/tre.rb +++ b/app/src/dgp/tre.rb @@ -60,7 +60,7 @@ if $INFO=='DEFAULT' end end -load 'Seg.rb' +load 'seg.rb' $dgpsep=';' diff --git a/app/src/gph/gph b/app/src/gph/gph index 91611b7..74fb304 100755 --- a/app/src/gph/gph +++ b/app/src/gph/gph @@ -59,9 +59,10 @@ while(<>) $do=1 if $line[2] eq $p; } + my $gph = ''; if($do) { - @preds = (); + my @preds = (); shift @prev while @prev+0 && $prev[0]->[1] + $prev[0]->[2] < $line[0]; for my $p (@prev) { @@ -89,3 +90,4 @@ while(<>) print $_.$gph."\n"; } +