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
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-05-30 23:04:48 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-30 23:04:48 +0400
commit7279164c8a7ce938ae8564e797aa43416e163186 (patch)
tree5e2ff35cfaa1f3a6b8981e3968b9228eefe2595f /moses/DecodeStep.cpp
parent47902053b53d1b1af545c25356f0271a70fc55c2 (diff)
figure out which feature function to apply at which decode step. Book-keeping
Diffstat (limited to 'moses/DecodeStep.cpp')
-rw-r--r--moses/DecodeStep.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/moses/DecodeStep.cpp b/moses/DecodeStep.cpp
index 65f4f1c6e..6d76e0927 100644
--- a/moses/DecodeStep.cpp
+++ b/moses/DecodeStep.cpp
@@ -73,6 +73,16 @@ const GenerationDictionary* DecodeStep::GetGenerationDictionaryFeature() const
return dynamic_cast<const GenerationDictionary*>(m_decodeFeature);
}
+void DecodeStep::RemoveFeature(const FeatureFunction *ff)
+{
+ for (size_t i = 0; i < m_featuresToApply.size(); ++i) {
+ if (ff == m_featuresToApply[i]) {
+ m_featuresToApply.erase(m_featuresToApply.begin() + i);
+ return;
+ }
+ }
+}
+
}