diff options
author | Hieu Hoang <fishandfrolick@gmail.com> | 2012-05-26 15:27:50 +0400 |
---|---|---|
committer | Hieu Hoang <fishandfrolick@gmail.com> | 2012-05-26 15:27:50 +0400 |
commit | cae4f803c3186d3f0c0143bb2f93be1929f7119a (patch) | |
tree | 0aed0b60b8a3f9f3aee7d3c88a87e1524bc6db46 /scripts/training | |
parent | 4c90c88733ed2bfa5a131394f1e75eb2adf0a863 (diff) |
faster consolidating - redirect to stdout then zip
Diffstat (limited to 'scripts/training')
-rwxr-xr-x | scripts/training/train-model.perl.missing_bin_dir | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/training/train-model.perl.missing_bin_dir b/scripts/training/train-model.perl.missing_bin_dir index 61e49970f..aac6cef96 100755 --- a/scripts/training/train-model.perl.missing_bin_dir +++ b/scripts/training/train-model.perl.missing_bin_dir @@ -1543,7 +1543,7 @@ sub score_phrase_phrase_extract { # merging the two halves print STDERR "(6.6) consolidating the two halves @ ".`date`; return if $___CONTINUE && -e "$ttable_file.gz"; - my $cmd = "$PHRASE_CONSOLIDATE $ttable_file.half.f2e.gz $ttable_file.half.e2f.gz $ttable_file.gz"; + my $cmd = "$PHRASE_CONSOLIDATE $ttable_file.half.f2e.gz $ttable_file.half.e2f.gz /dev/stdout"; $cmd .= " --Hierarchical" if $_HIERARCHICAL; $cmd .= " --LogProb" if $LOG_PROB; $cmd .= " --NegLogProb" if $NEG_LOG_PROB; @@ -1552,6 +1552,9 @@ sub score_phrase_phrase_extract { $cmd .= " --LowCountFeature" if $LOW_COUNT; $cmd .= " --GoodTuring $ttable_file.half.f2e.gz.coc" if $GOOD_TURING; $cmd .= " --KneserNey $ttable_file.half.f2e.gz.coc" if $KNESER_NEY; + + $cmd .= " | gzip -c > $ttable_file.gz"; + safesystem($cmd) or die "ERROR: Consolidating the two phrase table halves failed"; if (! $debug) { safesystem("rm -f $ttable_file.half.*") or die("ERROR"); } } |