mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
rename m_worseScore -> m_minBeamScore
This commit is contained in:
parent
ef105a1a9b
commit
a269d9ab71
@ -23,7 +23,7 @@ HypothesisColl::HypothesisColl(const ManagerBase &mgr)
|
||||
,m_sortedHypos(NULL)
|
||||
{
|
||||
m_bestScore = -std::numeric_limits<float>::infinity();
|
||||
m_worstScore = -std::numeric_limits<float>::infinity();
|
||||
m_minBeamScore = -std::numeric_limits<float>::infinity();
|
||||
}
|
||||
|
||||
const HypothesisBase *HypothesisColl::GetBestHypo() const
|
||||
@ -57,11 +57,11 @@ void HypothesisColl::Add(
|
||||
cerr << "scores:"
|
||||
<< futureScore << " "
|
||||
<< m_bestScore << " "
|
||||
<< m_worstScore << " "
|
||||
<< m_minBeamScore << " "
|
||||
<< GetSize() << " "
|
||||
<< endl;
|
||||
*/
|
||||
if (futureScore < m_worstScore) {
|
||||
if (futureScore < m_minBeamScore) {
|
||||
// beam threshold
|
||||
//cerr << "Discard:" << hypo->Debug(system) << endl;
|
||||
hypoRecycle.Recycle(hypo);
|
||||
@ -75,8 +75,8 @@ void HypothesisColl::Add(
|
||||
// this may also affect the worst score
|
||||
SCORE beamWidth = system.options.search.beam_width;
|
||||
//cerr << "beamWidth=" << beamWidth << endl;
|
||||
if ( m_bestScore + beamWidth > m_worstScore ) {
|
||||
m_worstScore = m_bestScore + beamWidth;
|
||||
if ( m_bestScore + beamWidth > m_minBeamScore ) {
|
||||
m_minBeamScore = m_bestScore + beamWidth;
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ void HypothesisColl::Clear()
|
||||
m_sortedHypos = NULL;
|
||||
m_coll.clear();
|
||||
m_bestScore = -std::numeric_limits<float>::infinity();
|
||||
m_worstScore = -std::numeric_limits<float>::infinity();
|
||||
m_minBeamScore = -std::numeric_limits<float>::infinity();
|
||||
}
|
||||
|
||||
std::string HypothesisColl::Debug(const System &system) const
|
||||
|
@ -61,7 +61,7 @@ protected:
|
||||
mutable Hypotheses *m_sortedHypos;
|
||||
|
||||
SCORE m_bestScore;
|
||||
SCORE m_worstScore;
|
||||
SCORE m_minBeamScore;
|
||||
|
||||
StackAdd Add(const HypothesisBase *hypo);
|
||||
void SortAndPruneHypos(const ManagerBase &mgr, ArcLists &arcLists) const;
|
||||
|
Loading…
Reference in New Issue
Block a user