figure out which feature function to apply at which decode step. Book-keeping

This commit is contained in:
Hieu Hoang 2013-05-30 22:13:57 +01:00
parent f9d6528088
commit 9c81696143
2 changed files with 4 additions and 2 deletions

View File

@ -148,6 +148,8 @@ void DecodeStepGeneration::Process(const TranslationOption &inputPartialTranslOp
outPhrase.GetScoreBreakdown().PlusEquals(generationScore);
outPhrase.MergeFactors(genPhrase, m_newOutputFactors);
outPhrase.Evaluate(src, m_featuresToApply);
const WordsRange &sourceWordsRange = inputPartialTranslOpt.GetSourceWordsRange();
TranslationOption *newTransOpt = new TranslationOption(sourceWordsRange, outPhrase);

View File

@ -807,8 +807,8 @@ void FVector::merge(const FVector &other)
{
// dense
for (size_t i = 0; i < m_coreFeatures.size(); ++i) {
FValue thisVal = m_coreFeatures[i];
FValue otherVal = other.m_coreFeatures[i];
FValue &thisVal = m_coreFeatures[i];
const FValue otherVal = other.m_coreFeatures[i];
if (otherVal) {
CHECK(thisVal == 0 || thisVal == otherVal);