summaryrefslogtreecommitdiff
path: root/vest
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-05 19:56:15 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-05 19:56:15 +0000
commitb8dbd46607771b881b6480d5f88e3bf5de73a15e (patch)
treec79f050741fe7c74ad7a10f9b663850547414a37 /vest
parentd6adf213184e6bc427d6f4f072ca769bbd2e6881 (diff)
write the final weights file to STDOUT
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@138 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'vest')
-rwxr-xr-xvest/dist-vest.pl19
1 files changed, 9 insertions, 10 deletions
diff --git a/vest/dist-vest.pl b/vest/dist-vest.pl
index 83a45a6a..86d2b7e0 100755
--- a/vest/dist-vest.pl
+++ b/vest/dist-vest.pl
@@ -42,7 +42,6 @@ my $help = 0;
my $epsilon = 0.0001;
my $interval = 5;
my $dryrun = 0;
-my $ranges;
my $last_score = -10000000;
my $metric = "ibm_bleu";
my $dir;
@@ -66,7 +65,6 @@ if (GetOptions(
"max-iterations=i" => \$max_iterations,
"normalize=s" => \$normalize,
"pmem=s" => \$pmem,
- "ranges=s" => \$ranges,
"rand-directions=i" => \$rand_directions,
"ref-files=s" => \$refFiles,
"metric=s" => \$metric,
@@ -240,11 +238,10 @@ while (1){
$result = system($cmd);
unless ($result == 0){
cleanup();
- print STDERR "ERROR: mapinput command returned non-zero exit code $result\n";
- die;
+ die "ERROR: mapinput command returned non-zero exit code $result\n";
}
- `mkdir $dir/splag.$im1`;
+ `mkdir $dir/splag.$im1`;
$cmd="split -a 3 -l $lines_per_mapper $dir/agenda.$im1-$opt_iter $dir/splag.$im1/mapinput.";
print STDERR "COMMAND:\n$cmd\n";
$result = system($cmd);
@@ -277,8 +274,7 @@ while (1){
$result = system($script);
unless ($result == 0){
cleanup();
- print STDERR "ERROR: mapper returned non-zero exit code $result\n";
- die;
+ die "ERROR: mapper returned non-zero exit code $result\n";
}
} else {
my $script_file = "$dir/scripts/map.$shard";
@@ -328,8 +324,7 @@ while (1){
$result = system($cmd);
unless ($result == 0){
cleanup();
- print STDERR "ERROR: reducer command returned non-zero exit code $result\n";
- die;
+ die "ERROR: reducer command returned non-zero exit code $result\n";
}
$cmd="sort -nk3 $DIR_FLAG '-t|' $dir/redoutput.$im1 | head -1";
my $best=`$cmd`; chomp $best;
@@ -379,7 +374,11 @@ while (1){
print STDERR "\n==========\n";
}
-print STDERR "\nFINAL WEIGHTS: $dir/$lastWeightsFile\n(Use -w <this file> with hiero)\n\n";
+print STDERR "\nFINAL WEIGHTS: $dir/$lastWeightsFile\n(Use -w <this file> with the decoder)\n\n";
+
+print STDOUT "$dir/$lastWeightsFile\n";
+
+exit 0;
sub normalize_weights {
my ($rfn, $rpts, $feat) = @_;