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:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2012-02-27 19:35:42 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2012-02-27 19:35:42 +0400
commit6d6fb4383dbe4a46317e03babafec1bfa7e4bf73 (patch)
tree352fdb33c5ee8a6a6f0c755c202d2379fa4bcb1f /mert/mert.cpp
parentc3bb4c7abd76fc5302ddff2101bb13e66a502b2d (diff)
Fix a mistake in a previous commit: tuning on a subset of features.
In the commit 4b6232b757542e7dfd05b6c494d5f97fdb80c448, I thought I had fixed the bug around the tuning on a subset of features by checking whether pdim and the length of the active features which you want to optimize in the tuning. However, it was wrong. I should set Point::optindices appropriately according to specified the subset.
Diffstat (limited to 'mert/mert.cpp')
-rwxr-xr-xmert/mert.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/mert/mert.cpp b/mert/mert.cpp
index 195615542..6f80709cb 100755
--- a/mert/mert.cpp
+++ b/mert/mert.cpp
@@ -362,13 +362,6 @@ int main(int argc, char **argv)
vector<string> features;
Tokenize(option.to_optimize_str.c_str(), ',', &features);
- if (option.pdim != static_cast<int>(features.size())) {
- cerr << "Error: pdim and the specified number of features are not equal: "
- << "pdim = " << option.pdim
- << ", the number of features = " << features.size() << endl;
- exit(1);
- }
-
for (vector<string>::const_iterator it = features.begin();
it != features.end(); ++it) {
const int feature_index = data.getFeatureIndex(*it);
@@ -405,6 +398,7 @@ int main(int argc, char **argv)
Point::setpdim(option.pdim);
Point::setdim(to_optimize.size());
+ Point::set_optindices(to_optimize);
//starting points consist of specified points and random restarts
vector<Point> startingPoints;