default pt implementation if no phrase table specified

This commit is contained in:
Hieu Hoang 2012-06-08 00:19:56 +01:00
parent 82ca9fba69
commit 01b84656bf
2 changed files with 4 additions and 3 deletions

View File

@ -149,7 +149,6 @@ sub train_recase_model {
else {
$cmd .= " --lm 0:3:$DIR/cased.srilm.gz:0";
}
$cmd .= " -scripts-root-dir $SCRIPTS_ROOT_DIR" if $SCRIPTS_ROOT_DIR;
$cmd .= " -config $CONFIG" if $CONFIG;
print STDERR $cmd."\n";
system($cmd) == 0 || die("Recaser model training failed with error " . ($? >> 8) . "\n");

View File

@ -1843,9 +1843,8 @@ sub create_ini {
my $ff = $f;
$ff =~ s/\-/ /;
my $file = "$___MODEL_DIR/".($_HIERARCHICAL?"rule-table":"phrase-table").($___NOT_FACTORED ? "" : ".$f").".gz";
print STDERR "HIEU:".$SPECIFIED_TABLE[0] ."\n";
my $phrase_table_impl = ($_HIERARCHICAL? 6 : 0);
my $phrase_table_impl;
if (scalar(@SPECIFIED_TABLE)) {
$file = shift @SPECIFIED_TABLE;
my @toks = split(/:/,$file);
@ -1856,6 +1855,9 @@ sub create_ini {
$basic_weight_count = $toks[2];
}
}
else {
}
print INI "$phrase_table_impl $ff $basic_weight_count $file\n";
}