diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-10-03 15:03:09 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-10-03 15:03:09 +0400 |
commit | 8ccc99a94712d2f650fb2d8a73bcc658b0aa93ec (patch) | |
tree | 29e4c17e13d177d804ccc9dace45ba34c46dfe85 /moses/WordLattice.cpp | |
parent | 6759af3821efa10ebf0cdf329604bdaed9f4070b (diff) |
correct creation of input paths for lattices
Diffstat (limited to 'moses/WordLattice.cpp')
-rw-r--r-- | moses/WordLattice.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/moses/WordLattice.cpp b/moses/WordLattice.cpp index fd2d7a831..d6e6e0c54 100644 --- a/moses/WordLattice.cpp +++ b/moses/WordLattice.cpp @@ -210,7 +210,14 @@ WordLattice::CreateTranslationOptionCollection() const { size_t maxNoTransOptPerCoverage = StaticData::Instance().GetMaxNoTransOptPerCoverage(); float translationOptionThreshold = StaticData::Instance().GetTranslationOptionThreshold(); - TranslationOptionCollection *rv= new TranslationOptionCollectionLattice(*this, maxNoTransOptPerCoverage, translationOptionThreshold); + + TranslationOptionCollection *rv = NULL; + if (StaticData::Instance().GetUseLegacyPT()) { + rv = new TranslationOptionCollectionConfusionNet(*this, maxNoTransOptPerCoverage, translationOptionThreshold); + } + else { + rv = new TranslationOptionCollectionLattice(*this, maxNoTransOptPerCoverage, translationOptionThreshold); + } CHECK(rv); return rv; } |