diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-30 15:41:08 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-30 15:41:08 +0400 |
commit | 83c447784178d27b4c83a1d874b3ca6c3e5b62bd (patch) | |
tree | 378110428e9ac271463cf7d09c027a2ea7d97121 /moses/DecodeStep.cpp | |
parent | b61a57d654e1cfc7c0e5a2eef59e3eab45b31524 (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.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/moses/DecodeStep.cpp b/moses/DecodeStep.cpp index c8b2e36c1..f4f10e33b 100644 --- a/moses/DecodeStep.cpp +++ b/moses/DecodeStep.cpp @@ -49,7 +49,13 @@ DecodeStep::DecodeStep(const DecodeFeature *decodeFeature, // find out which feature function can be applied in this decode step for (size_t i = 0; i < features.size(); ++i) { - const FeatureFunction *feature = features[i]; + FeatureFunction *feature = features[i]; + if (feature->IsUseable(m_outputFactors)) { + m_featuresToApply.push_back(feature); + } + else { + m_featuresRemaining.push_back(feature); + } } } |