mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 19:49:41 +03:00
consistent naming of future scores, estimated scores
This commit is contained in:
parent
5f3ab98044
commit
c118849e97
@ -65,7 +65,7 @@ void
|
||||
Distortion::EvaluateInIsolation(const System &system,
|
||||
const PhraseBase &source, const TargetPhrase &targetPhrase,
|
||||
Scores &scores,
|
||||
Scores *estimatedFutureScores) const
|
||||
Scores *estimatedScore) const
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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>()) Scores(pool, numScores);
|
||||
Scores *estimatedScore = new (pool.Allocate<Scores>()) 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());
|
||||
}
|
||||
}
|
||||
|
@ -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<SCORE, void*> fromScoring = Score(context);
|
||||
score += fromScoring.first;
|
||||
}
|
||||
else if (estimatedFutureScores) {
|
||||
else if (estimatedScore) {
|
||||
std::pair<SCORE, void*> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -65,7 +65,7 @@ void
|
||||
PhraseTable::EvaluateInIsolation(const System &system,
|
||||
const PhraseBase &source, const TargetPhrase &targetPhrase,
|
||||
Scores &scores,
|
||||
Scores *estimatedFutureScores) const
|
||||
Scores *estimatedScore) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -45,7 +45,7 @@ void
|
||||
SkeletonStatefulFF::EvaluateInIsolation(const System &system,
|
||||
const PhraseBase &source, const TargetPhrase &targetPhrase,
|
||||
Scores &scores,
|
||||
Scores *estimatedFutureScores) const
|
||||
Scores *estimatedScore) const
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -21,7 +21,7 @@ void
|
||||
SkeletonStatelessFF::EvaluateInIsolation(const System &system,
|
||||
const PhraseBase &source, const TargetPhrase &targetPhrase,
|
||||
Scores &scores,
|
||||
Scores *estimatedFutureScores) const
|
||||
Scores *estimatedScore) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -19,6 +19,6 @@ public:
|
||||
EvaluateInIsolation(const System &system,
|
||||
const PhraseBase &source, const TargetPhrase &targetPhrase,
|
||||
Scores &scores,
|
||||
Scores *estimatedFutureScores) const;
|
||||
Scores *estimatedScore) const;
|
||||
|
||||
};
|
||||
|
@ -71,7 +71,7 @@ void
|
||||
UnknownWordPenalty::EvaluateInIsolation(const System &system,
|
||||
const PhraseBase &source, const TargetPhrase &targetPhrase,
|
||||
Scores &scores,
|
||||
Scores *estimatedFutureScores) const
|
||||
Scores *estimatedScore) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
EvaluateInIsolation(const System &system,
|
||||
const PhraseBase &source, const TargetPhrase &targetPhrase,
|
||||
Scores &scores,
|
||||
Scores *estimatedFutureScores) const;
|
||||
Scores *estimatedScore) const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
const PhraseBase &source,
|
||||
const TargetPhrase &targetPhrase,
|
||||
Scores &scores,
|
||||
Scores *estimatedFutureScores) const;
|
||||
Scores *estimatedScore) const;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user