summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
authorphilblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-05 20:39:13 +0000
committerphilblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-05 20:39:13 +0000
commitc26c81e305cb733d74db20189a1f3a7afd2fc306 (patch)
tree3ca1295d6449abc0f26eedc8e95b4cdb778c7f27 /gi
parentd2a0996da03c3344af499a179ae38fc84d8fd002 (diff)
Added pyp-topics config file.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@140 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi')
-rwxr-xr-xgi/pipeline/local-gi-pipeline.pl13
1 files changed, 3 insertions, 10 deletions
diff --git a/gi/pipeline/local-gi-pipeline.pl b/gi/pipeline/local-gi-pipeline.pl
index 7c31be3b..a9107907 100755
--- a/gi/pipeline/local-gi-pipeline.pl
+++ b/gi/pipeline/local-gi-pipeline.pl
@@ -13,9 +13,7 @@ my $NUM_TOPICS = 50;
my $NUM_SAMPLES = 1000;
my $CONTEXT_SIZE = 1;
my $BIDIR = 1;
-
-my $HIERARCHICAL_TOPICS = 0;
-my $FILTER_SINGLETONS = 0;
+my $TOPICS_CONFIG = "pyp-topics.conf";
my $EXTOOLS = "$SCRIPT_DIR/../../extools";
die "Can't find extools: $EXTOOLS" unless -e $EXTOOLS && -d $EXTOOLS;
@@ -42,8 +40,7 @@ usage() unless &GetOptions('base_phrase_max_size=i' => \$BASE_PHRASE_MAX_SIZE,
'topics=i' => \$NUM_TOPICS,
'trg_context=i' => \$CONTEXT_SIZE,
'samples=i' => \$NUM_SAMPLES,
- 'hierarchical-topics' => \$HIERARCHICAL_TOPICS,
- 'filter-singletons' => \$FILTER_SINGLETONS,
+ 'topics-config=s' => \$TOPICS_CONFIG,
);
usage() unless scalar @ARGV == 1;
@@ -135,11 +132,7 @@ sub topic_train {
if (-e $OUT_CLUSTERS) {
print STDERR "$OUT_CLUSTERS exists, reusing...\n";
} else {
- my $FILTER_SINGLETONS_ARG = "";
- $FILTER_SINGLETONS_ARG = "--filter-singleton-contexts" if $FILTER_SINGLETONS;
- my $HIERARCHICAL_TOPICS_ARG = "";
- $HIERARCHICAL_TOPICS_ARG = "--hierarchical-topics" if $HIERARCHICAL_TOPICS;
- safesystem("$TOPIC_TRAIN --data $IN_CONTEXTS --backoff-type simple -t $NUM_TOPICS -s $NUM_SAMPLES -o $OUT_CLUSTERS $HIERARCHICAL_TOPICS_ARG $FILTER_SINGLETONS_ARG -w /dev/null") or die "Topic training failed.\n";
+ safesystem("$TOPIC_TRAIN --data $IN_CONTEXTS --backoff-type simple -t $NUM_TOPICS -s $NUM_SAMPLES -o $OUT_CLUSTERS -c $TOPICS_CONFIG -w /dev/null") or die "Topic training failed.\n";
}
}