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:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-12-10 06:17:36 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-11 04:09:22 +0300
commit29694af6e43c1cec7a6fd0b157eb44faca706129 (patch)
treeacda250a83c5a3a4244be011f1f4b9e6337f5d6b /moses/Incremental.cpp
parent240b88c6834c9c94e8a6448a34dc4ad33bdf3fbd (diff)
Code cleanup and refactoring.
Diffstat (limited to 'moses/Incremental.cpp')
-rw-r--r--moses/Incremental.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/moses/Incremental.cpp b/moses/Incremental.cpp
index e67550548..d6f589b15 100644
--- a/moses/Incremental.cpp
+++ b/moses/Incremental.cpp
@@ -208,7 +208,7 @@ Manager::Manager(ttasksptr const& ttask)
: BaseManager(ttask)
, cells_(m_source, ChartCellBaseFactory(), parser_)
, parser_(ttask, cells_)
- , n_best_(search::NBestConfig(StaticData::Instance().options().nbest.nbest_size))
+ , n_best_(search::NBestConfig(StaticData::Instance().options()->nbest.nbest_size))
{ }
Manager::~Manager()
@@ -232,8 +232,8 @@ PopulateBest(const Model &model, const std::vector<lm::WordIndex> &words, Best &
const StaticData &data = StaticData::Instance();
const float lm_weight = data.GetWeights(&abstract)[0];
const float oov_weight = abstract.OOVFeatureEnabled() ? data.GetWeights(&abstract)[1] : 0.0;
- size_t cpl = data.options().cube.pop_limit;
- size_t nbs = data.options().nbest.nbest_size;
+ size_t cpl = data.options()->cube.pop_limit;
+ size_t nbs = data.options()->nbest.nbest_size;
search::Config config(lm_weight * log_10, cpl, search::NBestConfig(nbs));
search::Context<Model> context(config, model);
@@ -261,7 +261,7 @@ PopulateBest(const Model &model, const std::vector<lm::WordIndex> &words, Best &
template <class Model> void Manager::LMCallback(const Model &model, const std::vector<lm::WordIndex> &words)
{
- std::size_t nbest = StaticData::Instance().options().nbest.nbest_size;
+ std::size_t nbest = StaticData::Instance().options()->nbest.nbest_size;
if (nbest <= 1) {
search::History ret = PopulateBest(model, words, single_best_);
if (ret) {