diff options
author | Michael Denkowski <mdenkows@amazon.com> | 2015-09-23 17:12:28 +0300 |
---|---|---|
committer | Michael Denkowski <mdenkows@amazon.com> | 2015-09-23 17:12:28 +0300 |
commit | 52b7796ed85f0f32c4ce23c422d1187d9544c6af (patch) | |
tree | bb60388b9af88c6c42d38cb29c3e6d89b56b4afc /moses/BitmapContainer.h | |
parent | 3c61a008ef3bc81a607c393cead0ce2d16338670 (diff) |
Revert "Make cube pruning deterministic"
This reverts commit 5fbb69806a79586e0d797f9463fcf49d71e3ff3a.
Diffstat (limited to 'moses/BitmapContainer.h')
-rw-r--r-- | moses/BitmapContainer.h | 25 |
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; + }*/ } }; |