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 02:05:00 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-10 02:05:00 +0300
commit240b88c6834c9c94e8a6448a34dc4ad33bdf3fbd (patch)
treee9f43dba3717e8a430557c16a1d6543a13628ddf /moses/ConfusionNet.cpp
parentad5e27ae56298564dfd73637c160a682b5f5f028 (diff)
Passing around AllOptions or references thereto everywhere,
strong them locally where appropriate, so that compontents can become independent of StaticData once instantiated.
Diffstat (limited to 'moses/ConfusionNet.cpp')
-rw-r--r--moses/ConfusionNet.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/moses/ConfusionNet.cpp b/moses/ConfusionNet.cpp
index bbbbf07b6..f71c798f7 100644
--- a/moses/ConfusionNet.cpp
+++ b/moses/ConfusionNet.cpp
@@ -62,7 +62,7 @@ GetColumnIncrement(size_t i, size_t j) const
}
ConfusionNet::
-ConfusionNet() : InputType()
+ConfusionNet(AllOptions::ptr const& opts) : InputType(opts)
{
stats.createOne();
@@ -80,7 +80,7 @@ ConfusionNet::
}
ConfusionNet::
-ConfusionNet(Sentence const& s) : InputType()
+ConfusionNet(Sentence const& s) : InputType(s.options())
{
data.resize(s.GetSize());
for(size_t i=0; i<s.GetSize(); ++i) {
@@ -282,10 +282,10 @@ ConfusionNet::
CreateTranslationOptionCollection(ttasksptr const& ttask) const
{
size_t maxNoTransOptPerCoverage
- = ttask->options().search.max_trans_opt_per_cov;
+ = ttask->options()->search.max_trans_opt_per_cov;
// StaticData::Instance().GetMaxNoTransOptPerCoverage();
float translationOptionThreshold
- = ttask->options().search.trans_opt_threshold;
+ = ttask->options()->search.trans_opt_threshold;
// StaticData::Instance().GetTranslationOptionThreshold();
TranslationOptionCollection *rv
= new TranslationOptionCollectionConfusionNet