summaryrefslogtreecommitdiff
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
commite29f16d88bcf2d52332bb40cedae0aadea435673 (patch)
treedf0df8e2ac77d09dfd380b06cc74ad8e50298d76
parent99ab66e86693a7a3cf7aaf965f276d4e2f55f935 (diff)
pipeline scripts
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@18 ec762483-ff6d-05da-a07a-a48fb63a330f
-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 {