diff options
author | Ales Tamchyna <tamchyna@ufal.mff.cuni.cz> | 2015-02-16 14:32:00 +0300 |
---|---|---|
committer | Ales Tamchyna <tamchyna@ufal.mff.cuni.cz> | 2015-02-16 14:32:00 +0300 |
commit | f6884c55a1095b484195acc8570b280e638a72bf (patch) | |
tree | 60a0280644a5b354e7f7b3ae0ebe777c85a8ea9e /moses | |
parent | a46daa19383243b01426b59d87d11ea06d7a468e (diff) |
restoring broken evaluation of translation option list
Diffstat (limited to 'moses')
-rw-r--r-- | moses/TranslationOptionCollection.cpp | 15 | ||||
-rw-r--r-- | moses/TranslationOptionCollection.h | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/moses/TranslationOptionCollection.cpp b/moses/TranslationOptionCollection.cpp index aa65cb320..947172e55 100644 --- a/moses/TranslationOptionCollection.cpp +++ b/moses/TranslationOptionCollection.cpp @@ -525,9 +525,24 @@ namespace Moses typedef TranslationOptionList::const_iterator to_iter; for(to_iter i = tol.begin() ; i != tol.end() ; ++i) (*i)->EvaluateWithSourceContext(m_source); + EvaluateTranslationOptionListWithSourceContext(tol); } } } + +void TranslationOptionCollection::EvaluateTranslationOptionListWithSourceContext( + TranslationOptionList &translationOptionList) { + + const std::vector<FeatureFunction*> &ffs = FeatureFunction::GetFeatureFunctions(); + const StaticData &staticData = StaticData::Instance(); + for (size_t i = 0; i < ffs.size(); ++i) { + const FeatureFunction &ff = *ffs[i]; + if (! staticData.IsFeatureFunctionIgnored(ff)) { + ff.EvaluateTranslationOptionListWithSourceContext(m_source, translationOptionList); + } + } + +} void TranslationOptionCollection:: diff --git a/moses/TranslationOptionCollection.h b/moses/TranslationOptionCollection.h index 562912b18..880ede814 100644 --- a/moses/TranslationOptionCollection.h +++ b/moses/TranslationOptionCollection.h @@ -107,7 +107,7 @@ protected: void EvaluateWithSourceContext(); - void EvaluateTranslatonOptionListWithSourceContext(TranslationOptionList&); + void EvaluateTranslationOptionListWithSourceContext(TranslationOptionList&); void CacheLexReordering(); |