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:
authorMichael Denkowski <mdenkows@amazon.com>2015-09-25 12:03:23 +0300
committerMichael Denkowski <mdenkows@amazon.com>2015-09-25 12:03:23 +0300
commit56e3bc1ea209540bc0ade9797e6dfba578738e1d (patch)
treea3594bc0cd9783e3d109f374a9e20b323e736a5e /moses/BitmapContainer.cpp
parentd2a6aa752e91ce62bd746a704b1a7e7534fdbb59 (diff)
Reintroduce deterministic cube pruning as option
Use --cube-pruning-deterministic-search or --cbds
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();
}