summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-24 04:12:25 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-24 04:12:25 +0000
commit811ccd92f58a01b79f2795003839e75842ee9664 (patch)
treee7099517a4113b9ba5105e28f8fd3548d07bb8ca /gi
parent840d1b84a977b46180350bdb965a118150f238d9 (diff)
pipeline scripts
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@18 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi')
-rwxr-xr-xgi/pipeline/local-gi-pipeline.pl9
1 files changed, 6 insertions, 3 deletions
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 {