fix last commit

This commit is contained in:
Eva Hasler 2012-03-22 15:49:11 +00:00
parent 639102505e
commit 3b549f755c

View File

@ -68,19 +68,21 @@ class PhrasePairFeature: public StatelessFeatureFunction {
// only temporary: features for restricted training
if (!filePath.empty()) {
std::cerr << "Loading features for restricted training.. ";
std::ifstream inFile(filePath.c_str());
if (!inFile)
{
std::cerr << "could not open file " << filePath << std::endl;
exit(1);
}
std::string line;
while (getline(inFile, line)) {
m_limitedFeatures.insert(line);
}
inFile.close();
while (getline(inFile, line))
m_limitedFeatures.insert(line);
inFile.close();
m_unrestricted = false;
}
std::cerr << "done." << std::endl;
}
}
virtual void Evaluate(