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
path: root/moses/LM
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/LM
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/LM')
-rw-r--r--moses/LM/BackwardTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/moses/LM/BackwardTest.cpp b/moses/LM/BackwardTest.cpp
index bd9c74379..ef45d6e60 100644
--- a/moses/LM/BackwardTest.cpp
+++ b/moses/LM/BackwardTest.cpp
@@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "moses/TypeDef.h"
#include "moses/StaticData.h"
+#include "moses/parameters/AllOptions.h"
//#include "BackwardLMState.h"
#include "moses/LM/Backward.h"
@@ -61,12 +62,14 @@ namespace Moses
// Apparently some Boost versions use templates and are pretty strict about types matching.
#define SLOPPY_CHECK_CLOSE(ref, value, tol) BOOST_CHECK_CLOSE(static_cast<double>(ref), static_cast<double>(value), static_cast<double>(tol));
+AllOptions::ptr DefaultOptions(new AllOptions);
+
class BackwardLanguageModelTest
{
public:
BackwardLanguageModelTest() :
- dummyInput(new Sentence),
+ dummyInput(new Sentence(DefaultOptions)),
backwardLM(
static_cast< BackwardLanguageModel<lm::ngram::ProbingModel> * >(
ConstructBackwardLM(