From c118849e973e1cb9f8cb4bdf4fa824087923f8db Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 3 Nov 2015 09:58:39 +0000 Subject: [PATCH] consistent naming of future scores, estimated scores --- contrib/other-builds/moses2/Distortion.cpp | 2 +- contrib/other-builds/moses2/Distortion.h | 2 +- contrib/other-builds/moses2/FeatureFunction.h | 2 +- contrib/other-builds/moses2/FeatureFunctions.cpp | 8 ++++---- contrib/other-builds/moses2/LanguageModel.cpp | 8 ++++---- contrib/other-builds/moses2/LanguageModel.h | 2 +- contrib/other-builds/moses2/PhraseTable.cpp | 2 +- contrib/other-builds/moses2/PhraseTable.h | 2 +- contrib/other-builds/moses2/SkeletonStatefulFF.cpp | 2 +- contrib/other-builds/moses2/SkeletonStatefulFF.h | 2 +- contrib/other-builds/moses2/SkeletonStatelessFF.cpp | 2 +- contrib/other-builds/moses2/SkeletonStatelessFF.h | 2 +- contrib/other-builds/moses2/UnknownWordPenalty.cpp | 2 +- contrib/other-builds/moses2/UnknownWordPenalty.h | 2 +- contrib/other-builds/moses2/WordPenalty.cpp | 2 +- contrib/other-builds/moses2/WordPenalty.h | 2 +- 16 files changed, 22 insertions(+), 22 deletions(-) diff --git a/contrib/other-builds/moses2/Distortion.cpp b/contrib/other-builds/moses2/Distortion.cpp index b0ab05ff7..defeba0c4 100644 --- a/contrib/other-builds/moses2/Distortion.cpp +++ b/contrib/other-builds/moses2/Distortion.cpp @@ -65,7 +65,7 @@ void Distortion::EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const + Scores *estimatedScore) const { } diff --git a/contrib/other-builds/moses2/Distortion.h b/contrib/other-builds/moses2/Distortion.h index 5228e788f..7bfff7b58 100644 --- a/contrib/other-builds/moses2/Distortion.h +++ b/contrib/other-builds/moses2/Distortion.h @@ -25,7 +25,7 @@ public: const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const; + Scores *estimatedScore) const; virtual Moses::FFState* EvaluateWhenApplied(const Manager &mgr, const Hypothesis &hypo, diff --git a/contrib/other-builds/moses2/FeatureFunction.h b/contrib/other-builds/moses2/FeatureFunction.h index 3a6cbc276..6e08c5f4f 100644 --- a/contrib/other-builds/moses2/FeatureFunction.h +++ b/contrib/other-builds/moses2/FeatureFunction.h @@ -41,7 +41,7 @@ public: EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const = 0; + Scores *estimatedScore) const = 0; protected: size_t m_startInd; diff --git a/contrib/other-builds/moses2/FeatureFunctions.cpp b/contrib/other-builds/moses2/FeatureFunctions.cpp index 4e4fef64c..c9c051814 100644 --- a/contrib/other-builds/moses2/FeatureFunctions.cpp +++ b/contrib/other-builds/moses2/FeatureFunctions.cpp @@ -150,15 +150,15 @@ FeatureFunctions::EvaluateInIsolation(MemPool &pool, const System &system, const PhraseBase &source, TargetPhrase &targetPhrase) const { size_t numScores = system.GetFeatureFunctions().GetNumScores(); - Scores *estimatedFutureScores = new (pool.Allocate()) Scores(pool, numScores); + Scores *estimatedScore = new (pool.Allocate()) Scores(pool, numScores); BOOST_FOREACH(const FeatureFunction *ff, m_featureFunctions) { Scores& scores = targetPhrase.GetScores(); - ff->EvaluateInIsolation(system, source, targetPhrase, scores, estimatedFutureScores); + ff->EvaluateInIsolation(system, source, targetPhrase, scores, estimatedScore); } - if (estimatedFutureScores) { - targetPhrase.SetEstimatedScore(estimatedFutureScores->GetTotalScore()); + if (estimatedScore) { + targetPhrase.SetEstimatedScore(estimatedScore->GetTotalScore()); } } diff --git a/contrib/other-builds/moses2/LanguageModel.cpp b/contrib/other-builds/moses2/LanguageModel.cpp index e50dc39e1..5b07e3514 100644 --- a/contrib/other-builds/moses2/LanguageModel.cpp +++ b/contrib/other-builds/moses2/LanguageModel.cpp @@ -126,7 +126,7 @@ void LanguageModel::EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const + Scores *estimatedScore) const { if (targetPhrase.GetSize() == 0) { return; @@ -146,15 +146,15 @@ LanguageModel::EvaluateInIsolation(const System &system, std::pair fromScoring = Score(context); score += fromScoring.first; } - else if (estimatedFutureScores) { + else if (estimatedScore) { std::pair fromScoring = Score(context); nonFullScore += fromScoring.first; } } scores.PlusEquals(system, *this, score); - if (estimatedFutureScores) { - estimatedFutureScores->PlusEquals(system, *this, nonFullScore); + if (estimatedScore) { + estimatedScore->PlusEquals(system, *this, nonFullScore); } } diff --git a/contrib/other-builds/moses2/LanguageModel.h b/contrib/other-builds/moses2/LanguageModel.h index 3ab04b48f..2d51d0510 100644 --- a/contrib/other-builds/moses2/LanguageModel.h +++ b/contrib/other-builds/moses2/LanguageModel.h @@ -56,7 +56,7 @@ public: EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const; + Scores *estimatedScore) const; virtual Moses::FFState* EvaluateWhenApplied(const Manager &mgr, const Hypothesis &hypo, diff --git a/contrib/other-builds/moses2/PhraseTable.cpp b/contrib/other-builds/moses2/PhraseTable.cpp index a508eb6a7..115190948 100644 --- a/contrib/other-builds/moses2/PhraseTable.cpp +++ b/contrib/other-builds/moses2/PhraseTable.cpp @@ -65,7 +65,7 @@ void PhraseTable::EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const + Scores *estimatedScore) const { } diff --git a/contrib/other-builds/moses2/PhraseTable.h b/contrib/other-builds/moses2/PhraseTable.h index 4478f7e8f..278c4a22d 100644 --- a/contrib/other-builds/moses2/PhraseTable.h +++ b/contrib/other-builds/moses2/PhraseTable.h @@ -37,7 +37,7 @@ public: EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const; + Scores *estimatedScore) const; protected: std::string m_path; diff --git a/contrib/other-builds/moses2/SkeletonStatefulFF.cpp b/contrib/other-builds/moses2/SkeletonStatefulFF.cpp index 808bdb1d3..1eb880f86 100644 --- a/contrib/other-builds/moses2/SkeletonStatefulFF.cpp +++ b/contrib/other-builds/moses2/SkeletonStatefulFF.cpp @@ -45,7 +45,7 @@ void SkeletonStatefulFF::EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const + Scores *estimatedScore) const { } diff --git a/contrib/other-builds/moses2/SkeletonStatefulFF.h b/contrib/other-builds/moses2/SkeletonStatefulFF.h index 31431eb67..907061a71 100644 --- a/contrib/other-builds/moses2/SkeletonStatefulFF.h +++ b/contrib/other-builds/moses2/SkeletonStatefulFF.h @@ -22,7 +22,7 @@ public: EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const; + Scores *estimatedScore) const; virtual Moses::FFState* EvaluateWhenApplied(const Manager &mgr, const Hypothesis &hypo, diff --git a/contrib/other-builds/moses2/SkeletonStatelessFF.cpp b/contrib/other-builds/moses2/SkeletonStatelessFF.cpp index 660eb67cd..8757c664c 100644 --- a/contrib/other-builds/moses2/SkeletonStatelessFF.cpp +++ b/contrib/other-builds/moses2/SkeletonStatelessFF.cpp @@ -21,7 +21,7 @@ void SkeletonStatelessFF::EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const + Scores *estimatedScore) const { } diff --git a/contrib/other-builds/moses2/SkeletonStatelessFF.h b/contrib/other-builds/moses2/SkeletonStatelessFF.h index bc7bcfdc0..b726aaf3f 100644 --- a/contrib/other-builds/moses2/SkeletonStatelessFF.h +++ b/contrib/other-builds/moses2/SkeletonStatelessFF.h @@ -19,6 +19,6 @@ public: EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const; + Scores *estimatedScore) const; }; diff --git a/contrib/other-builds/moses2/UnknownWordPenalty.cpp b/contrib/other-builds/moses2/UnknownWordPenalty.cpp index efb2bb271..7774b1d74 100644 --- a/contrib/other-builds/moses2/UnknownWordPenalty.cpp +++ b/contrib/other-builds/moses2/UnknownWordPenalty.cpp @@ -71,7 +71,7 @@ void UnknownWordPenalty::EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const + Scores *estimatedScore) const { } diff --git a/contrib/other-builds/moses2/UnknownWordPenalty.h b/contrib/other-builds/moses2/UnknownWordPenalty.h index 839a927ba..744d44eaf 100644 --- a/contrib/other-builds/moses2/UnknownWordPenalty.h +++ b/contrib/other-builds/moses2/UnknownWordPenalty.h @@ -22,7 +22,7 @@ public: EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const; + Scores *estimatedScore) const; }; diff --git a/contrib/other-builds/moses2/WordPenalty.cpp b/contrib/other-builds/moses2/WordPenalty.cpp index a71ae51dd..2dedaa17c 100644 --- a/contrib/other-builds/moses2/WordPenalty.cpp +++ b/contrib/other-builds/moses2/WordPenalty.cpp @@ -26,7 +26,7 @@ WordPenalty::EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const + Scores *estimatedScore) const { SCORE score = - (SCORE) targetPhrase.GetSize(); scores.PlusEquals(system, *this, score); diff --git a/contrib/other-builds/moses2/WordPenalty.h b/contrib/other-builds/moses2/WordPenalty.h index f0cb716e7..22e9a7674 100644 --- a/contrib/other-builds/moses2/WordPenalty.h +++ b/contrib/other-builds/moses2/WordPenalty.h @@ -21,7 +21,7 @@ public: const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, - Scores *estimatedFutureScores) const; + Scores *estimatedScore) const; };