diff options
author | MosesAdmin <moses-support-owner@mit.edu> | 2015-10-27 03:00:59 +0300 |
---|---|---|
committer | MosesAdmin <moses-support-owner@mit.edu> | 2015-10-27 03:00:59 +0300 |
commit | ec8dbdb94a46e70969490ecc6c4e22fb3a7f9802 (patch) | |
tree | 4b170ba9cabf06c121c7def814bbd2dfcf10e57c /moses/TranslationTask.cpp | |
parent | ca71a28d61a105681abfd90c0a0ab4eaa497bcb4 (diff) |
daily automatic beautifier
Diffstat (limited to 'moses/TranslationTask.cpp')
-rw-r--r-- | moses/TranslationTask.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/moses/TranslationTask.cpp b/moses/TranslationTask.cpp index f0a7fc7c4..e8c5307c9 100644 --- a/moses/TranslationTask.cpp +++ b/moses/TranslationTask.cpp @@ -166,21 +166,20 @@ options() const } /// parse document-level translation info stored on the input -void +void TranslationTask:: interpret_dlt() { if (m_source->GetType() != SentenceInput) return; Sentence const& snt = static_cast<Sentence const&>(*m_source); typedef std::map<std::string,std::string> dltmap_t; - BOOST_FOREACH(dltmap_t const& M, snt.GetDltMeta()) - { - dltmap_t::const_iterator i = M.find("type"); - if (i == M.end() || i->second != "adaptive-lm") continue; - dltmap_t::const_iterator j = M.find("context-weights"); - if (j == M.end()) continue; - SetContextWeights(j->second); - } + BOOST_FOREACH(dltmap_t const& M, snt.GetDltMeta()) { + dltmap_t::const_iterator i = M.find("type"); + if (i == M.end() || i->second != "adaptive-lm") continue; + dltmap_t::const_iterator j = M.find("context-weights"); + if (j == M.end()) continue; + SetContextWeights(j->second); + } } @@ -191,14 +190,14 @@ void TranslationTask::Run() << " input and iowrapper."); const size_t translationId = m_source->GetTranslationId(); - + // report wall time spent on translation Timer translationTime; translationTime.start(); interpret_dlt(); // parse document-level translation info stored on the input - + // report thread number #if defined(WITH_THREADS) && defined(BOOST_HAS_PTHREADS) VERBOSE(2, "Translating line " << translationId << " in thread id " << pthread_self() << endl); |