minor fixes

This commit is contained in:
phikoehn 2012-10-18 02:20:38 +01:00
parent 04544f8bfc
commit f19d53dac9
3 changed files with 7 additions and 3 deletions

View File

@ -1241,6 +1241,9 @@ sub get_parameters_relevant_for_re_use {
#my $module_set = $step; $module_set =~ s/:[^:]+$//;
my ($module,$set,$dummy) = &deconstruct_name($step);
foreach my $parameter (@{$RERUN_ON_CHANGE{&defined_step($step)}}) {
#if ($parameter =~ /\//) {
# TODO: handle scripts that need to be checked for time stamps
#}
my $value = &backoff_and_get_array(&extend_local_name($module,$set,$parameter));
$value = join(" ",@{$value}) if ref($value) eq 'ARRAY';
$VALUE{$parameter} = $value if $value;

View File

@ -39,7 +39,7 @@ foreach my $feature_spec (split(/,\s*/,$specification)) {
if ($SPEC[1] eq 'top' && $SPEC[2] =~ /^\d+$/ && $SPEC[3] =~ /^\d+$/) {
my $file_in = &create_top_words($input_extension, $SPEC[2]);
my $file_out = &create_top_words($output_extension, $SPEC[3]);
$ini .= "[word-translation-feature]\n0 0 $file_in $file_out\n\n";
$ini .= "[word-translation-feature]\n0-0 $file_in $file_out\n\n";
$report .= "wt\n";
}
else {

View File

@ -12,13 +12,14 @@ binmode(STDERR, ":utf8");
my $SRILM = "/home/pkoehn/moses/srilm/bin/i686-m64";
my $TEMPDIR = "/tmp";
my ($TUNING,$LM,$NAME,$GROUP);
my ($TUNING,$LM,$NAME,$GROUP,$CONTINUE);
die("interpolate-lm.perl --tuning set --name out-lm --lm lm0,lm1,lm2,lm3 [--srilm srilm-dir --tempdir tempdir --group \"0,1 2,3\"]")
unless &GetOptions('tuning=s' => => \$TUNING,
'name=s' => \$NAME,
'srilm=s' => \$SRILM,
'tempdir=s' => \$TEMPDIR,
'continue' => \$CONTINUE,
'group=s' => \$GROUP,
'lm=s' => \$LM);
@ -97,7 +98,7 @@ foreach my $subgroup (split(/ /,$GROUP)) {
my $name = $NAME.".group-".chr(97+($g++));
push @SUB_NAME,$name;
print STDERR "\n=== BUILDING SUB LM $name from\n\t".join("\n\t",@SUB_LM)."\n===\n\n";
&interpolate($name, @SUB_LM);
&interpolate($name, @SUB_LM) unless $CONTINUE && -e $name;
}
for(my $lm_i=0; $lm_i < scalar(@LM); $lm_i++) {
next if defined($ALREADY{$lm_i});