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:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-10-24 03:31:50 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-10-24 03:33:47 +0300
commit8c4e017fbf04936182b9ce9555d79bd8f8a6cf77 (patch)
tree4b727442f38130eec0cdf192e345d0c6d1f2903b /moses/Hypothesis.cpp
parent8ace1398eb4e38a288c4e35966e722e39561c1b5 (diff)
Eliminated EvaluateWhenAppliedWithContext().
The Phrase class now provides access to the TranslationTask.
Diffstat (limited to 'moses/Hypothesis.cpp')
-rw-r--r--moses/Hypothesis.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp
index 847c14f81..d1ef92494 100644
--- a/moses/Hypothesis.cpp
+++ b/moses/Hypothesis.cpp
@@ -143,17 +143,15 @@ AddArc(Hypothesis *loserHypo)
void
Hypothesis::
-EvaluateWhenApplied(StatefulFeatureFunction const& sfff,
- int state_idx)
+EvaluateWhenApplied(StatefulFeatureFunction const& sfff, int state_idx)
{
const StaticData &staticData = StaticData::Instance();
if (! staticData.IsFeatureFunctionIgnored( sfff )) {
- Manager& manager = this->GetManager(); //Get the manager and the ttask
- ttasksptr const& ttask = manager.GetTtask();
-
- m_ffStates[state_idx] = sfff.EvaluateWhenAppliedWithContext
- (ttask, *this, m_prevHypo ? m_prevHypo->m_ffStates[state_idx] : NULL,
- &m_currScoreBreakdown);
+ // Manager& manager = this->GetManager(); //Get the manager and the ttask
+ // ttasksptr const& ttask = manager.GetTtask();
+ FFState const* prev = m_prevHypo ? m_prevHypo->m_ffStates[state_idx] : NULL;
+ m_ffStates[state_idx]
+ = sfff.EvaluateWhenApplied(*this, prev, &m_currScoreBreakdown);
}
}