mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
-stack 0 means no stack pruning
This commit is contained in:
parent
0e98f1bc06
commit
65326f205f
@ -190,6 +190,8 @@ void ChartHypothesisCollection::Remove(const HCType::iterator &iter)
|
||||
*/
|
||||
void ChartHypothesisCollection::PruneToSize(ChartManager &manager)
|
||||
{
|
||||
if (m_maxHypoStackSize == 0) return; // no limit
|
||||
|
||||
if (GetSize() > m_maxHypoStackSize) { // ok, if not over the limit
|
||||
priority_queue<float> bestScores;
|
||||
|
||||
|
@ -153,6 +153,8 @@ void HypothesisStackCubePruning::AddInitial(Hypothesis *hypo)
|
||||
|
||||
void HypothesisStackCubePruning::PruneToSize(size_t newSize)
|
||||
{
|
||||
if ( newSize == 0) return; // no limit
|
||||
|
||||
if (m_hypos.size() > newSize) { // ok, if not over the limit
|
||||
priority_queue<float> bestScores;
|
||||
|
||||
|
@ -153,6 +153,7 @@ bool HypothesisStackNormal::AddPrune(Hypothesis *hypo)
|
||||
|
||||
void HypothesisStackNormal::PruneToSize(size_t newSize)
|
||||
{
|
||||
if ( newSize == 0) return; // no limit
|
||||
if ( size() <= newSize ) return; // ok, if not over the limit
|
||||
|
||||
// we need to store a temporary list of hypotheses
|
||||
|
@ -63,7 +63,7 @@ Parameter::Parameter()
|
||||
AddParam("phrase-drop-allowed", "da", "if present, allow dropping of source words"); //da = drop any (word); see -du for comparison
|
||||
AddParam("report-all-factors", "report all factors in output, not just first");
|
||||
AddParam("report-all-factors-in-n-best", "Report all factors in n-best-lists. Default is false");
|
||||
AddParam("stack", "s", "maximum stack size for histogram pruning");
|
||||
AddParam("stack", "s", "maximum stack size for histogram pruning. 0 = unlimited stack size");
|
||||
AddParam("stack-diversity", "sd", "minimum number of hypothesis of each coverage in stack (default 0)");
|
||||
AddParam("threads","th", "number of threads to use in decoding (defaults to single-threaded)");
|
||||
AddParam("translation-details", "T", "for each best hypothesis, report translation details to the given file");
|
||||
|
Loading…
Reference in New Issue
Block a user