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-23 17:12:28 +0300
committerMichael Denkowski <mdenkows@amazon.com>2015-09-23 17:12:28 +0300
commit52b7796ed85f0f32c4ce23c422d1187d9544c6af (patch)
treebb60388b9af88c6c42d38cb29c3e6d89b56b4afc /moses/BitmapContainer.h
parent3c61a008ef3bc81a607c393cead0ce2d16338670 (diff)
Revert "Make cube pruning deterministic"
This reverts commit 5fbb69806a79586e0d797f9463fcf49d71e3ff3a.
Diffstat (limited to 'moses/BitmapContainer.h')
-rw-r--r--moses/BitmapContainer.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/moses/BitmapContainer.h b/moses/BitmapContainer.h
index 9dc901e94..500059081 100644
--- a/moses/BitmapContainer.h
+++ b/moses/BitmapContainer.h
@@ -61,7 +61,6 @@ private:
size_t m_hypothesis_pos, m_translation_pos;
Hypothesis *m_hypothesis;
BackwardsEdge *m_edge;
- TargetPhrase m_target_phrase;
HypothesisQueueItem();
@@ -73,8 +72,7 @@ public:
: m_hypothesis_pos(hypothesis_pos)
, m_translation_pos(translation_pos)
, m_hypothesis(hypothesis)
- , m_edge(edge)
- , m_target_phrase(hypothesis->GetCurrTargetPhrase()) {
+ , m_edge(edge) {
}
~HypothesisQueueItem() {
@@ -95,10 +93,6 @@ public:
BackwardsEdge *GetBackwardsEdge() {
return m_edge;
}
-
- TargetPhrase& GetTargetPhrase() {
- return m_target_phrase;
- }
};
//! Allows comparison of two HypothesisQueueItem objects by the corresponding scores.
@@ -109,13 +103,20 @@ public:
float scoreA = itemA->GetHypothesis()->GetTotalScore();
float scoreB = itemB->GetHypothesis()->GetTotalScore();
- if (scoreA != scoreB)
+ return (scoreA < scoreB);
+
+ /*
{
- return (scoreA < scoreB);
+ return true;
}
-
- // Equal scores: break ties deterministically by comparing target phrases
- return (itemA->GetTargetPhrase().Compare(itemB->GetTargetPhrase()) < 0);
+ else if (scoreA < scoreB)
+ {
+ return false;
+ }
+ else
+ {
+ return itemA < itemB;
+ }*/
}
};