From f32d337fc08cad6c12922abd55ac011188a2d607 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Thu, 14 Feb 2013 19:02:00 +0000 Subject: [PATCH] filter new ini file --- misc/create-ini/RO.h | 7 ++++--- scripts/training/filter-model-given-input.pl | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/misc/create-ini/RO.h b/misc/create-ini/RO.h index beec031a9..a5a36a7a1 100644 --- a/misc/create-ini/RO.h +++ b/misc/create-ini/RO.h @@ -6,7 +6,7 @@ class RO : public FF { static int s_index; - std::string type; + std::string type, fileTypeSuffix; float GetWeight() const { return 0.3; } @@ -18,7 +18,7 @@ class RO : public FF << " type=" << type << " input-factor=" << OutputFactors(inFactors) << " output-factor=" << OutputFactors(outFactors) - << " path=" << path + << " path=" << path << "." << fileTypeSuffix << ".gz" << std::endl; } public: @@ -30,7 +30,8 @@ public: name = "LexicalReordering"; numFeatures = 6; path = toks[0]; - type = "msd-bidirectional-fe"; + type = "wbe-msd-bidirectional-fe-allff"; // TODO what is this? + fileTypeSuffix = "wbe-msd-bidirectional-fe"; inFactors.push_back(0); outFactors.push_back(0); diff --git a/scripts/training/filter-model-given-input.pl b/scripts/training/filter-model-given-input.pl index c809f33ba..5d2ab515a 100755 --- a/scripts/training/filter-model-given-input.pl +++ b/scripts/training/filter-model-given-input.pl @@ -181,8 +181,8 @@ while() { } # for (my $i = 1; $i < scalar(@toks); ++$i) { - push @TABLE,$file; - + push @TABLE, $file; + $file =~ s/^.*\/+([^\/]+)/$1/g; my $new_name = "$dir/$file"; $new_name =~ s/\.gz//;