Merge branch 'master' of ssh://github.com/moses-smt/mosesdecoder

This commit is contained in:
phikoehn 2014-01-01 19:10:52 +00:00
commit 0c6e73f40f
4 changed files with 9 additions and 0 deletions

View File

@ -301,6 +301,7 @@ int main(int argc, char* argv[])
#endif
delete ioWrapper;
FeatureFunction::Destroy();
IFVERBOSE(1)
PrintUserTime("End.");

View File

@ -755,6 +755,7 @@ int main(int argc, char** argv)
#endif
delete ioWrapper;
FeatureFunction::Destroy();
} catch (const std::exception &e) {
std::cerr << "Exception: " << e.what() << std::endl;

View File

@ -6,6 +6,7 @@
#include "moses/Hypothesis.h"
#include "moses/Manager.h"
#include "moses/TranslationOption.h"
#include "moses/Util.h"
using namespace std;
@ -28,6 +29,11 @@ FeatureFunction &FeatureFunction::FindFeatureFunction(const std::string& name)
throw "Unknown feature " + name;
}
void FeatureFunction::Destroy()
{
RemoveAllInColl(s_staticColl);
}
FeatureFunction::
FeatureFunction(const std::string& line)
: m_tuneable(true)

View File

@ -44,6 +44,7 @@ public:
return s_staticColl;
}
static FeatureFunction &FindFeatureFunction(const std::string& name);
static void Destroy();
FeatureFunction(const std::string &line);
FeatureFunction(size_t numScoreComponents, const std::string &line);