diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-10-31 15:50:52 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-10-31 15:50:52 +0300 |
commit | 324c378f7fc54f02a8ea264915d3eade867ff23d (patch) | |
tree | 2bb934fee448845b0524427d437c871e7118ac2c /moses/TranslationTask.cpp | |
parent | dc8ad899454bd82408c6a371d5f50e497ede0caa (diff) |
Options refactoring. Moses crashed in server mode when asked to provide n-best translations with scores.
Diffstat (limited to 'moses/TranslationTask.cpp')
-rw-r--r-- | moses/TranslationTask.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/moses/TranslationTask.cpp b/moses/TranslationTask.cpp index 122d8313b..5eab55c82 100644 --- a/moses/TranslationTask.cpp +++ b/moses/TranslationTask.cpp @@ -186,7 +186,8 @@ void TranslationTask::Run() // report thread number #if defined(WITH_THREADS) && defined(BOOST_HAS_PTHREADS) - VERBOSE(2, "Translating line " << translationId << " in thread id " << pthread_self() << endl); + VERBOSE(2, "Translating line " << translationId << " in thread id " + << pthread_self() << endl); #endif @@ -214,8 +215,8 @@ void TranslationTask::Run() OutputCollector* ocoll; Timer additionalReportingTime; additionalReportingTime.start(); - boost::shared_ptr<IOWrapper> const& io = m_ioWrapper; + manager->OutputBest(io->GetSingleBestOutputCollector()); // output word graph @@ -229,7 +230,7 @@ void TranslationTask::Run() // Output search graph in hypergraph format for Kenneth Heafield's // lazy hypergraph decoder; writes to stderr - if (StaticData::Instance().GetOutputSearchGraphHypergraph()) { + if (options().output.SearchGraphHG.size()) { size_t transId = manager->GetSource().GetTranslationId(); string fname = io->GetHypergraphOutputFileName(transId); manager->OutputSearchGraphAsHypergraph(fname, PRECISION); |