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-10-31 15:50:52 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-10-31 15:50:52 +0300
commit324c378f7fc54f02a8ea264915d3eade867ff23d (patch)
tree2bb934fee448845b0524427d437c871e7118ac2c /moses/ChartHypothesisCollection.cpp
parentdc8ad899454bd82408c6a371d5f50e497ede0caa (diff)
Options refactoring. Moses crashed in server mode when asked to provide n-best translations with scores.
Diffstat (limited to 'moses/ChartHypothesisCollection.cpp')
-rw-r--r--moses/ChartHypothesisCollection.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/moses/ChartHypothesisCollection.cpp b/moses/ChartHypothesisCollection.cpp
index 068194287..f7002bfad 100644
--- a/moses/ChartHypothesisCollection.cpp
+++ b/moses/ChartHypothesisCollection.cpp
@@ -26,6 +26,7 @@
#include "ChartManager.h"
#include "HypergraphOutput.h"
#include "util/exception.hh"
+#include "parameters/AllOptions.h"
using namespace std;
using namespace Moses;
@@ -33,13 +34,13 @@ using namespace Moses;
namespace Moses
{
-ChartHypothesisCollection::ChartHypothesisCollection()
+ChartHypothesisCollection::ChartHypothesisCollection(AllOptions const& opts)
{
- const StaticData &staticData = StaticData::Instance();
+ // const StaticData &staticData = StaticData::Instance();
- m_beamWidth = staticData.GetBeamWidth();
- m_maxHypoStackSize = staticData.options().search.stack_size;
- m_nBestIsEnabled = staticData.options().nbest.enabled;
+ m_beamWidth = opts.search.beam_width; // staticData.GetBeamWidth();
+ m_maxHypoStackSize = opts.search.stack_size; // staticData.options().search.stack_size;
+ m_nBestIsEnabled = opts.nbest.enabled; // staticData.options().nbest.enabled;
m_bestScore = -std::numeric_limits<float>::infinity();
}