From e29f16d88bcf2d52332bb40cedae0aadea435673 Mon Sep 17 00:00:00 2001 From: redpony Date: Thu, 24 Jun 2010 04:12:25 +0000 Subject: pipeline scripts git-svn-id: https://ws10smt.googlecode.com/svn/trunk@18 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/pipeline/local-gi-pipeline.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gi') diff --git a/gi/pipeline/local-gi-pipeline.pl b/gi/pipeline/local-gi-pipeline.pl index 4707d5a3..eea31d10 100755 --- a/gi/pipeline/local-gi-pipeline.pl +++ b/gi/pipeline/local-gi-pipeline.pl @@ -57,12 +57,14 @@ extract_context(); contexts_to_documents(); topic_train(); label_spans_with_topics(); +my $res; if ($BIDIR) { - grammar_extract_bidir(); + $res = grammar_extract_bidir(); } else { - grammar_extract(); + $res = grammar_extract(); } print STDERR "\n!!!COMPLETE!!!\n"; +print STDERR "GRAMMAR: $res\n\nYou should probably run:\n\n $SCRIPT_DIR/filter-for-test-set.pl $CORPUS $res TESTSET.TXT > filtered-grammar.scfg\n\n"; exit 0; @@ -146,6 +148,7 @@ sub grammar_extract { } else { safesystem("$EXTRACTOR -i $LABELED -c $ITEMS_IN_MEMORY -L $BASE_PHRASE_MAX_SIZE | $SORT_KEYS | $REDUCER -p | $GZIP > $OUTGRAMMAR") or die "Couldn't extract grammar"; } + return $OUTGRAMMAR; } sub grammar_extract_bidir { @@ -158,7 +161,7 @@ sub grammar_extract_bidir { } else { safesystem("$EXTRACTOR -i $LABELED -c $ITEMS_IN_MEMORY -L $BASE_PHRASE_MAX_SIZE -b | $SORT_KEYS | $REDUCER -p -b | $SORT_KEYS | $REDUCER | $GZIP > $OUTGRAMMAR") or die "Couldn't extract grammar"; } - + return $OUTGRAMMAR; } sub safesystem { -- cgit v1.2.3