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:
authorHieu Hoang <hieuhoang@gmail.com>2015-11-09 15:44:39 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-11-09 15:44:39 +0300
commitd0be56f8abcb6842a37daaf696ef4e84d25db9ea (patch)
treec46d4027f2eab57b2c196662d1b3950cc19456d2 /moses/ChartHypothesisCollection.cpp
parent176573c0724a65be8c36e5b5c3890d201f936d63 (diff)
Consistent naming: total score -> m_futureScore
Diffstat (limited to 'moses/ChartHypothesisCollection.cpp')
-rw-r--r--moses/ChartHypothesisCollection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/moses/ChartHypothesisCollection.cpp b/moses/ChartHypothesisCollection.cpp
index f7002bfad..701b83a38 100644
--- a/moses/ChartHypothesisCollection.cpp
+++ b/moses/ChartHypothesisCollection.cpp
@@ -63,14 +63,14 @@ ChartHypothesisCollection::~ChartHypothesisCollection()
*/
bool ChartHypothesisCollection::AddHypothesis(ChartHypothesis *hypo, ChartManager &manager)
{
- if (hypo->GetTotalScore() == - std::numeric_limits<float>::infinity()) {
+ if (hypo->GetFutureScore() == - std::numeric_limits<float>::infinity()) {
manager.GetSentenceStats().AddDiscarded();
VERBOSE(3,"discarded, -inf score" << std::endl);
delete hypo;
return false;
}
- if (hypo->GetTotalScore() < m_bestScore + m_beamWidth) {
+ if (hypo->GetFutureScore() < m_bestScore + m_beamWidth) {
// really bad score. don't bother adding hypo into collection
manager.GetSentenceStats().AddDiscarded();
VERBOSE(3,"discarded, too bad for stack" << std::endl);
@@ -97,7 +97,7 @@ bool ChartHypothesisCollection::AddHypothesis(ChartHypothesis *hypo, ChartManage
// found existing hypo with same target ending.
// keep the best 1
- if (hypo->GetTotalScore() > hypoExisting->GetTotalScore()) {
+ if (hypo->GetFutureScore() > hypoExisting->GetFutureScore()) {
// incoming hypo is better than the one we have
VERBOSE(3,"better than matching hyp " << hypoExisting->GetId() << ", recombining, ");
if (m_nBestIsEnabled) {
@@ -138,9 +138,9 @@ pair<ChartHypothesisCollection::HCType::iterator, bool> ChartHypothesisCollectio
VERBOSE(3,"added hyp to stack");
// Update best score, if this hypothesis is new best
- if (hypo->GetTotalScore() > m_bestScore) {
+ if (hypo->GetFutureScore() > m_bestScore) {
VERBOSE(3,", best on stack");
- m_bestScore = hypo->GetTotalScore();
+ m_bestScore = hypo->GetFutureScore();
}
// Prune only if stack is twice as big as needed (lazy pruning)
@@ -189,7 +189,7 @@ void ChartHypothesisCollection::PruneToSize(ChartManager &manager)
float score = 0;
while (iter != m_hypos.end()) {
ChartHypothesis *hypo = *iter;
- score = hypo->GetTotalScore();
+ score = hypo->GetFutureScore();
if (score > m_bestScore+m_beamWidth) {
bestScores.push(score);
}
@@ -209,7 +209,7 @@ void ChartHypothesisCollection::PruneToSize(ChartManager &manager)
iter = m_hypos.begin();
while (iter != m_hypos.end()) {
ChartHypothesis *hypo = *iter;
- float score = hypo->GetTotalScore();
+ float score = hypo->GetFutureScore();
if (score < scoreThreshold) {
HCType::iterator iterRemove = iter++;
Remove(iterRemove);
@@ -224,7 +224,7 @@ void ChartHypothesisCollection::PruneToSize(ChartManager &manager)
TRACE_ERR("stack now contains: ");
for(iter = m_hypos.begin(); iter != m_hypos.end(); iter++) {
ChartHypothesis *hypo = *iter;
- TRACE_ERR( hypo->GetId() << " (" << hypo->GetTotalScore() << ") ");
+ TRACE_ERR( hypo->GetId() << " (" << hypo->GetFutureScore() << ") ");
}
TRACE_ERR( endl);
}