mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
daily automatic beautifier
This commit is contained in:
parent
d317fdc373
commit
fef50536d6
@ -134,7 +134,7 @@ SHyperedge *Cube::CreateHyperedge(const std::vector<int> &coordinates)
|
||||
// Calculate future score.
|
||||
|
||||
hyperedge->label.futureScore =
|
||||
hyperedge->label.translation->GetScoreBreakdown().GetWeightedScore();
|
||||
hyperedge->label.translation->GetScoreBreakdown().GetWeightedScore();
|
||||
|
||||
hyperedge->label.futureScore += hyperedge->label.deltas.GetWeightedScore();
|
||||
|
||||
|
@ -42,7 +42,7 @@ void KBestExtractor::Extract(
|
||||
for (++p; p != topLevelVertices.end(); ++p) {
|
||||
// Check that the first item in topLevelVertices really was the best.
|
||||
UTIL_THROW_IF2((*p)->best->label.futureScore >
|
||||
bestTopLevelVertex.best->label.futureScore,
|
||||
bestTopLevelVertex.best->label.futureScore,
|
||||
"top-level SVertices are not correctly sorted");
|
||||
// Note: there's no need for a smart pointer here: supremeVertex will take
|
||||
// ownership of altEdge.
|
||||
|
@ -92,12 +92,12 @@ void PhraseDictionaryGroup::Load()
|
||||
m_scoresPerModel = nScores;
|
||||
} else if (m_defaultAverageOthers) {
|
||||
UTIL_THROW_IF2(nScores != m_scoresPerModel,
|
||||
m_description << ": member models must have the same number of scores when using default-average-others");
|
||||
m_description << ": member models must have the same number of scores when using default-average-others");
|
||||
}
|
||||
}
|
||||
}
|
||||
UTIL_THROW_IF2(!pdFound,
|
||||
m_description << ": could not find member phrase table " << pdName);
|
||||
m_description << ": could not find member phrase table " << pdName);
|
||||
}
|
||||
m_totalModelScores = numScoreComponents;
|
||||
|
||||
@ -112,7 +112,7 @@ void PhraseDictionaryGroup::Load()
|
||||
numScoreComponents += (pow(2, m_numModels) - 1);
|
||||
}
|
||||
UTIL_THROW_IF2(numScoreComponents != m_numScoreComponents,
|
||||
m_description << ": feature count mismatch: specify \"num-features=" << numScoreComponents << "\" and supply " << numScoreComponents << " weights");
|
||||
m_description << ": feature count mismatch: specify \"num-features=" << numScoreComponents << "\" and supply " << numScoreComponents << " weights");
|
||||
|
||||
#ifdef PT_UG
|
||||
// Locate mmsapt lexical reordering functions if specified
|
||||
@ -128,7 +128,7 @@ void PhraseDictionaryGroup::Load()
|
||||
// Determine "zero" scores for features
|
||||
if (m_haveDefaultScores) {
|
||||
UTIL_THROW_IF2(m_defaultScores.size() != m_numScoreComponents,
|
||||
m_description << ": number of specified default scores is unequal to number of member model scores");
|
||||
m_description << ": number of specified default scores is unequal to number of member model scores");
|
||||
} else {
|
||||
// Default is all 0 (as opposed to e.g. -99 or similar to approximate log(0)
|
||||
// or a smoothed "not in model" score)
|
||||
|
Loading…
Reference in New Issue
Block a user