Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/moses2
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2020-10-01 20:33:59 +0300
committerHieu Hoang <hieuhoang@gmail.com>2020-10-01 20:33:59 +0300
commit2e94ba7a9f7f66042fb31704645997c18e9cd244 (patch)
treebcb5251049f7e7cb3d99e80767bdfd59711e98ff /moses2
parent95d93f8bd1be450c7713caf9584a37b9e211231f (diff)
add input arg to CleanUpAfterSentenceProcessing
Diffstat (limited to 'moses2')
-rw-r--r--moses2/FF/FeatureFunction.h2
-rw-r--r--moses2/FF/FeatureFunctions.cpp4
-rw-r--r--moses2/FF/FeatureFunctions.h2
-rw-r--r--moses2/ManagerBase.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/moses2/FF/FeatureFunction.h b/moses2/FF/FeatureFunction.h
index fa0f1fbe9..34742efb1 100644
--- a/moses2/FF/FeatureFunction.h
+++ b/moses2/FF/FeatureFunction.h
@@ -99,7 +99,7 @@ public:
virtual void InitializeForInput(const InputType &input) { };
// clean up temporary memory, called after processing each sentence
- virtual void CleanUpAfterSentenceProcessing() const {
+ virtual void CleanUpAfterSentenceProcessing(const InputType &input) const {
}
protected:
diff --git a/moses2/FF/FeatureFunctions.cpp b/moses2/FF/FeatureFunctions.cpp
index 12cdd8d24..efe018b7b 100644
--- a/moses2/FF/FeatureFunctions.cpp
+++ b/moses2/FF/FeatureFunctions.cpp
@@ -236,10 +236,10 @@ void FeatureFunctions::InitializeForInput(const InputType &input)
}
}
-void FeatureFunctions::CleanUpAfterSentenceProcessing() const
+void FeatureFunctions::CleanUpAfterSentenceProcessing(const InputType &input) const
{
BOOST_FOREACH(const FeatureFunction *ff, m_featureFunctions) {
- ff->CleanUpAfterSentenceProcessing();
+ ff->CleanUpAfterSentenceProcessing(input);
}
}
diff --git a/moses2/FF/FeatureFunctions.h b/moses2/FF/FeatureFunctions.h
index 6714d57cc..4c15d674a 100644
--- a/moses2/FF/FeatureFunctions.h
+++ b/moses2/FF/FeatureFunctions.h
@@ -88,7 +88,7 @@ public:
void EvaluateWhenAppliedBatch(const Batch &batch) const;
void InitializeForInput(const InputType &input);
- void CleanUpAfterSentenceProcessing() const;
+ void CleanUpAfterSentenceProcessing(const InputType &input) const;
void ShowWeights(const Weights &allWeights);
diff --git a/moses2/ManagerBase.cpp b/moses2/ManagerBase.cpp
index 06365df54..0ab60f9f1 100644
--- a/moses2/ManagerBase.cpp
+++ b/moses2/ManagerBase.cpp
@@ -35,7 +35,7 @@ ManagerBase::ManagerBase(System &sys, const TranslationTask &task,
ManagerBase::~ManagerBase()
{
- system.featureFunctions.CleanUpAfterSentenceProcessing();
+ system.featureFunctions.CleanUpAfterSentenceProcessing(*m_input);
if (m_pool) {
GetPool().Reset();