initialise m_container

This commit is contained in:
Hieu Hoang 2014-08-04 15:59:32 +01:00
parent 3f3912772d
commit abe68be588
3 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ TargetPhrase::TargetPhrase()
{
}
TargetPhrase::TargetPhrase(const Phrase &phrase)
TargetPhrase::TargetPhrase(const Phrase &phrase, const PhraseDictionary *pt)
: Phrase(phrase)
, m_fullScore(0.0)
, m_futureScore(0.0)
@ -58,7 +58,7 @@ TargetPhrase::TargetPhrase(const Phrase &phrase)
, m_alignNonTerm(&AlignmentInfoCollection::Instance().GetEmptyAlignmentInfo())
, m_lhsTarget(NULL)
, m_ruleSource(NULL)
, m_container(NULL)
, m_container(pt)
{
}

View File

@ -67,7 +67,7 @@ private:
public:
TargetPhrase();
TargetPhrase(const TargetPhrase &copy);
explicit TargetPhrase(const Phrase &targetPhrase);
explicit TargetPhrase(const Phrase &targetPhrase, const PhraseDictionary *pt);
~TargetPhrase();
// 1st evaluate method. Called during loading of phrase table.

View File

@ -222,7 +222,7 @@ bool RuleTableLoaderCompact::LoadRuleSection(
// The remaining columns are currently ignored.
// Create and score target phrase.
TargetPhrase *targetPhrase = new TargetPhrase(targetPhrasePhrase);
TargetPhrase *targetPhrase = new TargetPhrase(targetPhrasePhrase, &ruleTable);
targetPhrase->SetAlignNonTerm(alignNonTerm);
targetPhrase->SetTargetLHS(targetLhs);