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:
Diffstat (limited to 'moses/BitmapContainer.cpp')
-rw-r--r--moses/BitmapContainer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/moses/BitmapContainer.cpp b/moses/BitmapContainer.cpp
index 40ec74153..ae7c03990 100644
--- a/moses/BitmapContainer.cpp
+++ b/moses/BitmapContainer.cpp
@@ -273,9 +273,11 @@ BackwardsEdge::PushSuccessors(const size_t x, const size_t y)
////////////////////////////////////////////////////////////////////////////////
BitmapContainer::BitmapContainer(const WordsBitmap &bitmap
- , HypothesisStackCubePruning &stack)
+ , HypothesisStackCubePruning &stack
+ , bool deterministic)
: m_bitmap(bitmap)
, m_stack(stack)
+ , m_deterministic(deterministic)
, m_numStackInsertions(0)
{
m_hypotheses = HypothesisSet();
@@ -309,10 +311,13 @@ BitmapContainer::Enqueue(int hypothesis_pos
, Hypothesis *hypothesis
, BackwardsEdge *edge)
{
+ // Only supply target phrase if running deterministic search mode
+ const TargetPhrase *target_phrase = m_deterministic ? &(hypothesis->GetCurrTargetPhrase()) : NULL;
HypothesisQueueItem *item = new HypothesisQueueItem(hypothesis_pos
, translation_pos
, hypothesis
- , edge);
+ , edge
+ , target_phrase);
IFVERBOSE(2) {
item->GetHypothesis()->GetManager().GetSentenceStats().StartTimeManageCubes();
}