Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <fishandfrolick@gmail.com>2012-06-07 18:46:58 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2012-06-07 18:46:58 +0400
commit05fc5ffce36dd1ccf1a00ab247953743544683c0 (patch)
tree571d4d5dee2bb4fda890cc931edcee761926dfa3 /scripts/training
parent0b59bee21ca284c5225149c46f43430fccb4d854 (diff)
phrase table type deduced in experiment.perl. Passed to train-model.perl
Diffstat (limited to 'scripts/training')
-rwxr-xr-xscripts/training/train-model.perl22
1 files changed, 15 insertions, 7 deletions
diff --git a/scripts/training/train-model.perl b/scripts/training/train-model.perl
index 971cdbe06..77569256d 100755
--- a/scripts/training/train-model.perl
+++ b/scripts/training/train-model.perl
@@ -1839,13 +1839,21 @@ sub create_ini {
$basic_weight_count++ if defined($_SCORE_OPTIONS) && $_SCORE_OPTIONS =~ /LowCountFeature/; # low count feature
$basic_weight_count++ if $_PCFG;
foreach my $f (split(/\+/,$___TRANSLATION_FACTORS)) {
- $num_of_ttables++;
- my $ff = $f;
- $ff =~ s/\-/ /;
- my $file = "$___MODEL_DIR/".($_HIERARCHICAL?"rule-table":"phrase-table").($___NOT_FACTORED ? "" : ".$f").".gz";
- $file = shift @SPECIFIED_TABLE if scalar(@SPECIFIED_TABLE);
- my $phrase_table_impl = ($_HIERARCHICAL ? 6 : 0);
- print INI "$phrase_table_impl $ff $basic_weight_count $file\n";
+ $num_of_ttables++;
+ 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;
+ if (scalar(@SPECIFIED_TABLE)) {
+ $file = shift @SPECIFIED_TABLE;
+ my @toks = split(/:/,$file);
+ $file = $toks[0];
+ $phrase_table_impl = $toks[1];
+ }
+
+ print INI "$phrase_table_impl $ff $basic_weight_count $file\n";
}
if ($_GLUE_GRAMMAR) {
&full_path(\$___GLUE_GRAMMAR_FILE);