diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2016-10-06 15:10:55 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2016-10-06 15:10:55 +0300 |
commit | fa888166c00d266c09de6f22d123901aae15d73a (patch) | |
tree | 1ce820ddf4d1295b9c9bbd58f9277c59511ac9e4 | |
parent | cb348f159adae8208ded7042f51c5d9dd739ccb0 (diff) |
no segfault. yay
-rw-r--r-- | moses/TranslationModel/ProbingPT/ProbingPT.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/moses/TranslationModel/ProbingPT/ProbingPT.cpp b/moses/TranslationModel/ProbingPT/ProbingPT.cpp index 1fd982f0e..06b1360cd 100644 --- a/moses/TranslationModel/ProbingPT/ProbingPT.cpp +++ b/moses/TranslationModel/ProbingPT/ProbingPT.cpp @@ -304,6 +304,7 @@ TargetPhrase *ProbingPT::CreateTargetPhrase( // words for (size_t targetPos = 0; targetPos < numRealWords; ++targetPos) { + Word &word = tp->AddWord(); for (size_t i = 0; i < m_output.size(); ++i) { FactorType factorType = m_output[i]; @@ -312,7 +313,6 @@ TargetPhrase *ProbingPT::CreateTargetPhrase( const Factor *factor = GetTargetFactor(*probingId); assert(factor); - Word &word = tp->GetWord(targetPos); word[factorType] = factor; offset += sizeof(uint32_t); |