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>2014-04-09 13:33:33 +0400
committerHieu Hoang <hieuhoang@gmail.com>2014-04-09 13:33:33 +0400
commit65326f205f6e78184d8dfc4e5230dc5f4055815d (patch)
treef5b5c6d36b37c7e665914746e2911aed13633281 /moses/HypothesisStackCubePruning.cpp
parent0e98f1bc06602a041ca92bf24441ba19d0a8ab70 (diff)
-stack 0 means no stack pruning
Diffstat (limited to 'moses/HypothesisStackCubePruning.cpp')
-rw-r--r--moses/HypothesisStackCubePruning.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/moses/HypothesisStackCubePruning.cpp b/moses/HypothesisStackCubePruning.cpp
index d36323fb2..febb56e9a 100644
--- a/moses/HypothesisStackCubePruning.cpp
+++ b/moses/HypothesisStackCubePruning.cpp
@@ -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;