diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-08-07 14:20:48 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-08-07 14:20:48 +0300 |
commit | 36427beb2faf4e45d37a10ff8707ef4a2a604aa6 (patch) | |
tree | 4d95737749d332b36d67ddaa0415b7431f657a5e /moses/TranslationTask.cpp | |
parent | 6527c238754e561575e8408bf69598ed2c495547 (diff) | |
parent | d11906abcdc43c6e5d41ff75d99b91c654a49daf (diff) |
Merge branch 'mmt-dev2' into mmt-dev
Conflicts:
moses/FF/HyperParameterAsWeight.cpp
moses/Sentence.cpp
moses/StaticData.cpp
moses/StaticData.h
moses/parameters/AllOptions.cpp
moses/parameters/AllOptions.h
moses/parameters/SearchOptions.cpp
moses/parameters/SearchOptions.h
Diffstat (limited to 'moses/TranslationTask.cpp')
-rw-r--r-- | moses/TranslationTask.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/moses/TranslationTask.cpp b/moses/TranslationTask.cpp index 5bbd03769..3262ee2de 100644 --- a/moses/TranslationTask.cpp +++ b/moses/TranslationTask.cpp @@ -100,7 +100,9 @@ TranslationTask ::TranslationTask(boost::shared_ptr<InputType> const& source, boost::shared_ptr<IOWrapper> const& ioWrapper) : m_source(source) , m_ioWrapper(ioWrapper) -{ } +{ + m_options = StaticData::Instance().options(); +} TranslationTask::~TranslationTask() { } @@ -112,7 +114,7 @@ TranslationTask { boost::shared_ptr<BaseManager> manager; StaticData const& staticData = StaticData::Instance(); - if (algo == DefaultSearchAlgorithm) algo = staticData.GetSearchAlgorithm(); + if (algo == DefaultSearchAlgorithm) algo = staticData.options().search.algo; if (!is_syntax(algo)) manager.reset(new Manager(this->self())); // phrase-based @@ -154,6 +156,13 @@ TranslationTask return manager; } +AllOptions const& +TranslationTask:: +options() const +{ + return m_options; +} + void TranslationTask::Run() { UTIL_THROW_IF2(!m_source || !m_ioWrapper, |