Skip to content

Commit

Permalink
Removed tm_args complication from pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpost committed Apr 11, 2015
1 parent fb16123 commit 9e5ee85
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scripts/training/pipeline.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1524,10 +1524,8 @@ sub parse_tm_line {
system("mkdir -p $tunedir") unless -d $tunedir;

my $tmtype = "thrax";
my $tmargs = "";
if ($GRAMMAR_TYPE eq "phrase") {
$tmtype = "moses";
$tmargs = "-max-source-len $MAX_PHRASE_LEN";
}

foreach my $key (keys %TUNEFILES) {
Expand All @@ -1554,7 +1552,6 @@ sub parse_tm_line {
s/<GRAMMAR_TYPE>/$GRAMMAR_TYPE/g;
s/<GRAMMAR_FILE>/$TUNE_GRAMMAR/g;
s/<GRAMMAR_KEYWORD>/$tmtype/g;
s/<GRAMMAR_ARGS>/$tmargs/g;
s/<GLUE_GRAMMAR>/$GLUE_GRAMMAR_FILE/g;
s/<MAXSPAN>/$MAXSPAN/g;
s/<OOV>/$OOV/g;
Expand Down Expand Up @@ -1733,7 +1730,7 @@ sub parse_tm_line {
# Copy the config file over.

$cachepipe->cmd("test-joshua-config-from-tune-$run",
"cat $tunedir/joshua.config.final | $COPY_CONFIG -mark-oovs false -tm '$tmtype -owner pt -maxspan $MAXSPAN -path $TEST_GRAMMAR $tmargs' > $testrun/joshua.config",
"cat $tunedir/joshua.config.final | $COPY_CONFIG -mark-oovs false -tm '$tmtype -owner pt -maxspan $MAXSPAN -path $TEST_GRAMMAR' > $testrun/joshua.config",
"$tunedir/joshua.config.final",
"$testrun/joshua.config");

Expand Down Expand Up @@ -1892,13 +1889,11 @@ sub parse_tm_line {

# copy over the config file
my $tmtype = "thrax";
my $tmargs = "";
if ($GRAMMAR_TYPE eq "phrase") {
$tmtype = "moses";
$tmargs = "-max-source-len $MAX_PHRASE_LEN";
}
$cachepipe->cmd("test-$NAME-copy-config",
"cat $TUNEFILES{'joshua.config'} | $COPY_CONFIG -mark-oovs false -tm/pt '$tmtype -owner pt -maxspan $MAXSPAN -path $TEST_GRAMMAR $tmargs' -default-non-terminal $OOV -search $SEARCH_ALGORITHM > $testrun/joshua.config",
"cat $TUNEFILES{'joshua.config'} | $COPY_CONFIG -mark-oovs false -tm/pt '$tmtype -owner pt -maxspan $MAXSPAN -path $TEST_GRAMMAR' -default-non-terminal $OOV -search $SEARCH_ALGORITHM > $testrun/joshua.config",
$TUNEFILES{'joshua.config'},
"$testrun/joshua.config");

Expand Down

0 comments on commit 9e5ee85

Please sign in to comment.