diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-03-30 03:20:17 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-03-30 03:20:17 +0300 |
commit | fcbfc5a535522328cd9c7abfc7f0680d93c3c9f4 (patch) | |
tree | 3c6c00c783fb098e1448c6c8ed4740c77431efae /moses/WordLattice.cpp | |
parent | 79cd40d2c487179565bdd05947cb11c996c3ce14 (diff) |
Feature functions and the constructors of TranslationOptionCollections
now have access to the current translation task.
This was done to allow context-sensitive processing (if provided by the FF).
Diffstat (limited to 'moses/WordLattice.cpp')
-rw-r--r-- | moses/WordLattice.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/moses/WordLattice.cpp b/moses/WordLattice.cpp index d377c1858..7804c9a58 100644 --- a/moses/WordLattice.cpp +++ b/moses/WordLattice.cpp @@ -219,7 +219,8 @@ bool WordLattice::CanIGetFromAToB(size_t start, size_t end) const } TranslationOptionCollection* -WordLattice::CreateTranslationOptionCollection() const +WordLattice +::CreateTranslationOptionCollection(ttasksptr const& ttask) const { size_t maxNoTransOptPerCoverage = StaticData::Instance().GetMaxNoTransOptPerCoverage(); float translationOptionThreshold = StaticData::Instance().GetTranslationOptionThreshold(); @@ -228,9 +229,9 @@ WordLattice::CreateTranslationOptionCollection() const //rv = new TranslationOptionCollectionConfusionNet(*this, maxNoTransOptPerCoverage, translationOptionThreshold); if (StaticData::Instance().GetUseLegacyPT()) { - rv = new TranslationOptionCollectionConfusionNet(*this, maxNoTransOptPerCoverage, translationOptionThreshold); + rv = new TranslationOptionCollectionConfusionNet(ttask, *this, maxNoTransOptPerCoverage, translationOptionThreshold); } else { - rv = new TranslationOptionCollectionLattice(*this, maxNoTransOptPerCoverage, translationOptionThreshold); + rv = new TranslationOptionCollectionLattice(ttask, *this, maxNoTransOptPerCoverage, translationOptionThreshold); } assert(rv); |