Revert "add CleanUpAfterSentenceProcessing() and InitializeForInput()"

This reverts commit 84d4307b0f.
This commit is contained in:
Hieu Hoang 2016-02-18 10:46:20 -05:00
parent 4c6af3bb29
commit 0961902a8a
4 changed files with 2 additions and 31 deletions

View File

@ -57,10 +57,8 @@ public:
EvaluateAfterTablePruning(MemPool &pool, const TargetPhrases &tps, const Phrase &sourcePhrase) const
{}
virtual void InitializeForInput(const Manager &mgr) const { };
// clean up temporary memory, called after processing each sentence
virtual void CleanUpAfterSentenceProcessing(const Manager &mgr) const {}
virtual void CleanUpAfterSentenceProcessing() {}
protected:
size_t m_startInd;

View File

@ -100,17 +100,6 @@ void KENLM::Load(System &system)
m_ngram.reset(new Model(m_path.c_str(), config));
}
void KENLM::InitializeForInput(const Manager &mgr) const
{
}
// clean up temporary memory, called after processing each sentence
void KENLM::CleanUpAfterSentenceProcessing(const Manager &mgr) const
{
}
void KENLM::SetParameter(const std::string& key, const std::string& value)
{
if (key == "path") {

View File

@ -63,11 +63,6 @@ public:
void SetParameter(const std::string& key, const std::string& value);
virtual void InitializeForInput(const Manager &mgr) const;
// clean up temporary memory, called after processing each sentence
virtual void CleanUpAfterSentenceProcessing(const Manager &mgr) const;
protected:
std::string m_path;
FactorType m_factorType;

View File

@ -36,12 +36,7 @@ Manager::Manager(System &sys, const TranslationTask &task, const std::string &in
,m_translationId(translationId)
{}
Manager::~Manager()
{
const std::vector<const FeatureFunction*> &ffs = system.featureFunctions.GetFeatureFunctions();
BOOST_FOREACH(const FeatureFunction *ff, ffs) {
ff->CleanUpAfterSentenceProcessing(*this);
}
Manager::~Manager() {
delete m_search;
delete m_bitmaps;
@ -129,12 +124,6 @@ void Manager::Init()
cerr << "Unknown search algorithm" << endl;
abort();
}
// init ffs
const std::vector<const FeatureFunction*> &ffs = system.featureFunctions.GetFeatureFunctions();
BOOST_FOREACH(const FeatureFunction *ff, ffs) {
ff->InitializeForInput(*this);
}
}
void Manager::Decode()