Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-10-03 15:03:09 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-10-03 15:03:09 +0400
commit8ccc99a94712d2f650fb2d8a73bcc658b0aa93ec (patch)
tree29e4c17e13d177d804ccc9dace45ba34c46dfe85 /moses/WordLattice.cpp
parent6759af3821efa10ebf0cdf329604bdaed9f4070b (diff)
correct creation of input paths for lattices
Diffstat (limited to 'moses/WordLattice.cpp')
-rw-r--r--moses/WordLattice.cpp9
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;
}