From bc5801b68704b607bd0afc8bbae6f92eeb5409f9 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Fri, 11 Feb 2011 09:59:47 -0500 Subject: multi-pass mert --- vest/dist-vest.pl | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'vest') diff --git a/vest/dist-vest.pl b/vest/dist-vest.pl index 52feb3e6..1852fa5a 100755 --- a/vest/dist-vest.pl +++ b/vest/dist-vest.pl @@ -64,6 +64,7 @@ my $use_make; # use make to parallelize line search my $dirargs=''; my $density_prune; my $usefork; +my $pass_suffix = ''; my $cpbin=1; # Process command-line options Getopt::Long::Configure("no_auto_abbrev"); @@ -72,6 +73,7 @@ if (GetOptions( "decode-nodes=i" => \$decode_nodes, "density-prune=f" => \$density_prune, "dont-clean" => \$disable_clean, + "pass-suffix" => \$pass_suffix, "use-fork" => \$usefork, "dry-run" => \$dryrun, "epsilon=s" => \$epsilon, @@ -265,7 +267,7 @@ while (1){ print STDERR `date`; my $im1 = $iteration - 1; my $weightsFile="$dir/weights.$im1"; - my $decoder_cmd = "$decoder -c $iniFile -w $weightsFile -O $dir/hgs"; + my $decoder_cmd = "$decoder -c $iniFile --weights$pass_suffix $weightsFile -O $dir/hgs"; if ($density_prune) { $decoder_cmd .= " --density_prune $density_prune"; } @@ -590,7 +592,11 @@ sub enseg { my $i=0; while (my $line=){ chomp $line; - print NEWSRC "$line\n"; + if (/^\s*$line\n"; + } $i++; } close SRC; @@ -620,12 +626,12 @@ Options: Use make -j to run the optimizer commands (useful on large shared-memory machines where qsub is unavailable). - --decoder - Decoder binary to use. - --decode-nodes Number of decoder processes to run in parallel. [default=15] + --decoder + Decoder binary to use. + --density-prune Limit the density of the hypergraph on each iteration to N times the number of edges on the Viterbi path. @@ -640,6 +646,10 @@ Options: Maximum number of iterations to run. If not specified, defaults to 10. + --pass-suffix + If the decoder is doing multi-pass decoding, the pass suffix "2", + "3", etc., is used to control what iteration of weights is set. + --pmem Amount of physical memory requested for parallel decoding jobs. -- cgit v1.2.3