mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 19:49:41 +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
|
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
|
// clean up temporary memory, called after processing each sentence
|
||||||
virtual void CleanUpAfterSentenceProcessing(const Manager &mgr) const {}
|
virtual void CleanUpAfterSentenceProcessing() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
size_t m_startInd;
|
size_t m_startInd;
|
||||||
|
@ -100,17 +100,6 @@ void KENLM::Load(System &system)
|
|||||||
m_ngram.reset(new Model(m_path.c_str(), config));
|
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)
|
void KENLM::SetParameter(const std::string& key, const std::string& value)
|
||||||
{
|
{
|
||||||
if (key == "path") {
|
if (key == "path") {
|
||||||
|
@ -63,11 +63,6 @@ public:
|
|||||||
|
|
||||||
void SetParameter(const std::string& key, const std::string& value);
|
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:
|
protected:
|
||||||
std::string m_path;
|
std::string m_path;
|
||||||
FactorType m_factorType;
|
FactorType m_factorType;
|
||||||
|
@ -36,12 +36,7 @@ Manager::Manager(System &sys, const TranslationTask &task, const std::string &in
|
|||||||
,m_translationId(translationId)
|
,m_translationId(translationId)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Manager::~Manager()
|
Manager::~Manager() {
|
||||||
{
|
|
||||||
const std::vector<const FeatureFunction*> &ffs = system.featureFunctions.GetFeatureFunctions();
|
|
||||||
BOOST_FOREACH(const FeatureFunction *ff, ffs) {
|
|
||||||
ff->CleanUpAfterSentenceProcessing(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
delete m_search;
|
delete m_search;
|
||||||
delete m_bitmaps;
|
delete m_bitmaps;
|
||||||
@ -129,12 +124,6 @@ void Manager::Init()
|
|||||||
cerr << "Unknown search algorithm" << endl;
|
cerr << "Unknown search algorithm" << endl;
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
// init ffs
|
|
||||||
const std::vector<const FeatureFunction*> &ffs = system.featureFunctions.GetFeatureFunctions();
|
|
||||||
BOOST_FOREACH(const FeatureFunction *ff, ffs) {
|
|
||||||
ff->InitializeForInput(*this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::Decode()
|
void Manager::Decode()
|
||||||
|
Loading…
Reference in New Issue
Block a user