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>2015-10-19 15:49:08 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-10-19 15:49:08 +0300
commitdb24036313717458c6995e087b1db1379867aab8 (patch)
tree15508ad2be39d354fe22430bbb85b78d1bc6f81b /moses/Hypothesis.cpp
parentb9f216cc96fda35fad9983037f02100e611c55fc (diff)
share bitmaps
Diffstat (limited to 'moses/Hypothesis.cpp')
-rw-r--r--moses/Hypothesis.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp
index eafdd8bd7..a426c186c 100644
--- a/moses/Hypothesis.cpp
+++ b/moses/Hypothesis.cpp
@@ -46,7 +46,7 @@ namespace Moses
Hypothesis::
Hypothesis(Manager& manager, InputType const& source, const TranslationOption &initialTransOpt)
: m_prevHypo(NULL)
- , m_sourceCompleted(source.GetSize(), manager.GetSource().m_sourceCompleted)
+ , m_sourceCompleted(manager.GetBitmaps().GetInitialBitmap())
, m_sourceInput(source)
, m_currSourceWordsRange(
m_sourceCompleted.GetFirstGapPos()>0 ? 0 : NOT_FOUND,
@@ -77,7 +77,7 @@ Hypothesis(Manager& manager, InputType const& source, const TranslationOption &i
Hypothesis::
Hypothesis(const Hypothesis &prevHypo, const TranslationOption &transOpt)
: m_prevHypo(&prevHypo)
- , m_sourceCompleted(prevHypo.m_sourceCompleted )
+ , m_sourceCompleted(prevHypo.GetManager().GetBitmaps().GetBitmap(prevHypo.GetWordsBitmap(), transOpt.GetSourceWordsRange()) )
, m_sourceInput(prevHypo.m_sourceInput)
, m_currSourceWordsRange(transOpt.GetSourceWordsRange())
, m_currTargetWordsRange(prevHypo.m_currTargetWordsRange.GetEndPos() + 1,
@@ -98,8 +98,6 @@ Hypothesis(const Hypothesis &prevHypo, const TranslationOption &transOpt)
// that this hypothesis has already translated!
assert(!m_sourceCompleted.Overlap(m_currSourceWordsRange));
- //_hash_computed = false;
- m_sourceCompleted.SetValue(m_currSourceWordsRange.GetStartPos(), m_currSourceWordsRange.GetEndPos(), true);
m_wordDeleted = transOpt.IsDeletionOption();
m_manager.GetSentenceStats().AddCreated();
}