mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-02 17:09:36 +03:00
Revert "add CleanUpAfterSentenceProcessing() and InitializeForInput()"
This reverts commit 84d4307b0f
.
This commit is contained in:
parent
4c6af3bb29
commit
0961902a8a
@ -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;
|
||||
|
@ -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") {
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user