diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2014-08-08 19:41:16 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2014-08-08 19:41:16 +0400 |
commit | 3d884bb098878d5ddf7c6c325f464c667946a3b0 (patch) | |
tree | 7f965344aba3dbd4a7b157aeb89c687b1d0acd8b /moses | |
parent | c723035d0faa7e31fe4276bd6846c1c75c18b8f7 (diff) |
method rename
Diffstat (limited to 'moses')
-rw-r--r-- | moses/BitmapContainer.cpp | 2 | ||||
-rw-r--r-- | moses/ChartHypothesis.cpp | 2 | ||||
-rw-r--r-- | moses/ChartHypothesis.h | 2 | ||||
-rw-r--r-- | moses/ChartManager.cpp | 2 | ||||
-rw-r--r-- | moses/Hypothesis.cpp | 8 | ||||
-rw-r--r-- | moses/Hypothesis.h | 6 | ||||
-rw-r--r-- | moses/RuleCubeItem.cpp | 2 | ||||
-rw-r--r-- | moses/SearchNormal.cpp | 2 | ||||
-rw-r--r-- | moses/SearchNormalBatch.cpp | 6 |
9 files changed, 16 insertions, 16 deletions
diff --git a/moses/BitmapContainer.cpp b/moses/BitmapContainer.cpp index 48bc33d9e..061a5953f 100644 --- a/moses/BitmapContainer.cpp +++ b/moses/BitmapContainer.cpp @@ -215,7 +215,7 @@ Hypothesis *BackwardsEdge::CreateHypothesis(const Hypothesis &hypothesis, const IFVERBOSE(2) { hypothesis.GetManager().GetSentenceStats().StopTimeBuildHyp(); } - newHypo->Evaluate(m_futurescore); + newHypo->EvaluateWhenApplied(m_futurescore); return newHypo; } diff --git a/moses/ChartHypothesis.cpp b/moses/ChartHypothesis.cpp index 7b32559b7..ec78ba2af 100644 --- a/moses/ChartHypothesis.cpp +++ b/moses/ChartHypothesis.cpp @@ -212,7 +212,7 @@ int ChartHypothesis::RecombineCompare(const ChartHypothesis &compare) const /** calculate total score * @todo this should be in ScoreBreakdown */ -void ChartHypothesis::Evaluate() +void ChartHypothesis::EvaluateWhenApplied() { const StaticData &staticData = StaticData::Instance(); // total scores from prev hypos diff --git a/moses/ChartHypothesis.h b/moses/ChartHypothesis.h index 3f159d222..8dc26e721 100644 --- a/moses/ChartHypothesis.h +++ b/moses/ChartHypothesis.h @@ -144,7 +144,7 @@ public: int RecombineCompare(const ChartHypothesis &compare) const; - void Evaluate(); + void EvaluateWhenApplied(); void AddArc(ChartHypothesis *loserHypo); void CleanupArcList(); diff --git a/moses/ChartManager.cpp b/moses/ChartManager.cpp index e137da915..9c0e940ff 100644 --- a/moses/ChartManager.cpp +++ b/moses/ChartManager.cpp @@ -141,7 +141,7 @@ void ChartManager::AddXmlChartOptions() RuleCubeItem* item = new RuleCubeItem( *opt, m_hypoStackColl ); ChartHypothesis* hypo = new ChartHypothesis(*opt, *item, *this); - hypo->Evaluate(); + hypo->EvaluateWhenApplied(); ChartCell &cell = m_hypoStackColl.Get(range); diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp index 1e3a3be82..21912c8bd 100644 --- a/moses/Hypothesis.cpp +++ b/moses/Hypothesis.cpp @@ -205,7 +205,7 @@ int Hypothesis::RecombineCompare(const Hypothesis &compare) const return 0; } -void Hypothesis::EvaluateWith(const StatefulFeatureFunction &sfff, +void Hypothesis::EvaluateWhenApplied(const StatefulFeatureFunction &sfff, int state_idx) { const StaticData &staticData = StaticData::Instance(); @@ -217,7 +217,7 @@ void Hypothesis::EvaluateWith(const StatefulFeatureFunction &sfff, } } -void Hypothesis::EvaluateWith(const StatelessFeatureFunction& slff) +void Hypothesis::EvaluateWhenApplied(const StatelessFeatureFunction& slff) { const StaticData &staticData = StaticData::Instance(); if (! staticData.IsFeatureFunctionIgnored( slff )) { @@ -228,7 +228,7 @@ void Hypothesis::EvaluateWith(const StatelessFeatureFunction& slff) /*** * calculate the logarithm of our total translation score (sum up components) */ -void Hypothesis::Evaluate(const SquareMatrix &futureScore) +void Hypothesis::EvaluateWhenApplied(const SquareMatrix &futureScore) { IFVERBOSE(2) { m_manager.GetSentenceStats().StartTimeOtherScore(); @@ -244,7 +244,7 @@ void Hypothesis::Evaluate(const SquareMatrix &futureScore) StatelessFeatureFunction::GetStatelessFeatureFunctions(); for (unsigned i = 0; i < sfs.size(); ++i) { const StatelessFeatureFunction &ff = *sfs[i]; - EvaluateWith(ff); + EvaluateWhenApplied(ff); } const vector<const StatefulFeatureFunction*>& ffs = diff --git a/moses/Hypothesis.h b/moses/Hypothesis.h index 279c949a4..2b0c98d91 100644 --- a/moses/Hypothesis.h +++ b/moses/Hypothesis.h @@ -142,7 +142,7 @@ public: return m_currTargetWordsRange.GetNumWordsCovered(); } - void Evaluate(const SquareMatrix &futureScore); + void EvaluateWhenApplied(const SquareMatrix &futureScore); int GetId()const { return m_id; @@ -256,8 +256,8 @@ public: } // Added by oliver.wilson@ed.ac.uk for async lm stuff. - void EvaluateWith(const StatefulFeatureFunction &sfff, int state_idx); - void EvaluateWith(const StatelessFeatureFunction &slff); + void EvaluateWhenApplied(const StatefulFeatureFunction &sfff, int state_idx); + void EvaluateWhenApplied(const StatelessFeatureFunction &slff); //! target span that trans opt would populate if applied to this hypo. Used for alignment check size_t GetNextStartPos(const TranslationOption &transOpt) const; diff --git a/moses/RuleCubeItem.cpp b/moses/RuleCubeItem.cpp index 4525d059e..970bac94d 100644 --- a/moses/RuleCubeItem.cpp +++ b/moses/RuleCubeItem.cpp @@ -79,7 +79,7 @@ void RuleCubeItem::CreateHypothesis(const ChartTranslationOptions &transOpt, ChartManager &manager) { m_hypothesis = new ChartHypothesis(transOpt, *this, manager); - m_hypothesis->Evaluate(); + m_hypothesis->EvaluateWhenApplied(); m_score = m_hypothesis->GetTotalScore(); } diff --git a/moses/SearchNormal.cpp b/moses/SearchNormal.cpp index d40324c15..80ff37703 100644 --- a/moses/SearchNormal.cpp +++ b/moses/SearchNormal.cpp @@ -288,7 +288,7 @@ void SearchNormal::ExpandHypothesis(const Hypothesis &hypothesis, const Translat stats.StopTimeBuildHyp(); } if (newHypo==NULL) return; - newHypo->Evaluate(m_transOptColl.GetFutureScore()); + newHypo->EvaluateWhenApplied(m_transOptColl.GetFutureScore()); } else // early discarding: check if hypothesis is too bad to build { diff --git a/moses/SearchNormalBatch.cpp b/moses/SearchNormalBatch.cpp index 244ebbf05..9700a0694 100644 --- a/moses/SearchNormalBatch.cpp +++ b/moses/SearchNormalBatch.cpp @@ -159,13 +159,13 @@ void SearchNormalBatch::EvalAndMergePartialHypos() ++sfff_iter) { const StatefulFeatureFunction &ff = *(sfff_iter->second); int state_idx = sfff_iter->first; - hypo->EvaluateWith(ff, state_idx); + hypo->EvaluateWhenApplied(ff, state_idx); } std::vector<const StatelessFeatureFunction*>::iterator slff_iter; for (slff_iter = m_stateless_ffs.begin(); slff_iter != m_stateless_ffs.end(); ++slff_iter) { - hypo->EvaluateWith(**slff_iter); + hypo->EvaluateWhenApplied(**slff_iter); } } @@ -190,7 +190,7 @@ void SearchNormalBatch::EvalAndMergePartialHypos() dlm_iter != m_dlm_ffs.end(); ++dlm_iter) { LanguageModel &lm = *(dlm_iter->second); - hypo->EvaluateWith(lm, (*dlm_iter).first); + hypo->EvaluateWhenApplied(lm, (*dlm_iter).first); } // Put completed hypothesis onto its stack. |