diff --git a/moses/src/Hypothesis.cpp b/moses/src/Hypothesis.cpp index d8d909d26..53e450eb6 100755 --- a/moses/src/Hypothesis.cpp +++ b/moses/src/Hypothesis.cpp @@ -72,7 +72,7 @@ Hypothesis::Hypothesis(const Hypothesis &prevHypo, const TranslationOption &tran : m_prevHypo(&prevHypo) , m_transOpt(&transOpt) , m_targetPhrase(transOpt.GetTargetPhrase()) - , m_sourcePhrase(0) + , m_sourcePhrase(transOpt.GetSourcePhrase()) , m_sourceCompleted (prevHypo.m_sourceCompleted ) , m_sourceInput (prevHypo.m_sourceInput) , m_currSourceWordsRange (transOpt.GetSourceWordsRange()) @@ -403,7 +403,8 @@ void Hypothesis::PrintHypothesis(const InputType &source, float /*weightDistorti } TRACE_ERR( ")"<m_totalScore - m_prevHypo->m_futureScore) < translation cost "<GetCurrSourceWordsRange())); // << " => distortion cost "<<(m_score[ScoreType::Distortion]*weightDistortion)< factorsToPrint) const { if (!m_prevHypo) { return ""; } + return m_sourcePhrase->GetStringRep(factorsToPrint); +#if 0 if(m_sourcePhrase) { return m_sourcePhrase->GetSubString(m_currSourceWordsRange).GetStringRep(factorsToPrint); @@ -483,6 +486,7 @@ std::string Hypothesis::GetSourcePhraseStringRep(const vector factor { return m_sourceInput.GetSubString(m_currSourceWordsRange).GetStringRep(factorsToPrint); } +#endif } std::string Hypothesis::GetTargetPhraseStringRep(const vector factorsToPrint) const {