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:
authorHieu Hoang <hieuhoang@gmail.com>2016-09-26 14:58:28 +0300
committerHieu Hoang <hieuhoang@gmail.com>2016-09-26 14:58:28 +0300
commit492886927ebbcaeb1b3212da27557287b71723a6 (patch)
tree2d891375e5ff3fe31124fb9798be2770e31e4bb2
parent445bcfda2daa802f7335eb4e03e17c2cf90a4c85 (diff)
OSM::Load()
-rw-r--r--contrib/moses2/FF/OSM/OpSequenceModel.cpp7
-rw-r--r--contrib/moses2/FF/OSM/OpSequenceModel.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/contrib/moses2/FF/OSM/OpSequenceModel.cpp b/contrib/moses2/FF/OSM/OpSequenceModel.cpp
index e80cdffb7..f58bb3825 100644
--- a/contrib/moses2/FF/OSM/OpSequenceModel.cpp
+++ b/contrib/moses2/FF/OSM/OpSequenceModel.cpp
@@ -2,6 +2,7 @@
#include "OpSequenceModel.h"
#include "../../PhraseBased/Manager.h"
#include "../../PhraseBased/Hypothesis.h"
+#include "lm/state.hh"
using namespace std;
@@ -139,11 +140,9 @@ void OpSequenceModel :: readLanguageModel(const char *lmFile)
string unkOp = "_TRANS_SLF_";
OSM = ConstructOSMLM(m_lmPath.c_str(), load_method);
- /*
- State startState = OSM->NullContextState();
- State endState;
+ lm::ngram::State startState = OSM->NullContextState();
+ lm::ngram::State endState;
unkOpProb = OSM->Score(startState,unkOp,endState);
- */
}
}
diff --git a/contrib/moses2/FF/OSM/OpSequenceModel.h b/contrib/moses2/FF/OSM/OpSequenceModel.h
index baed9951d..d46cc82fb 100644
--- a/contrib/moses2/FF/OSM/OpSequenceModel.h
+++ b/contrib/moses2/FF/OSM/OpSequenceModel.h
@@ -10,7 +10,7 @@ class OpSequenceModel : public StatefulFeatureFunction
{
public:
OSMLM* OSM;
-
+ float unkOpProb;
int numFeatures; // Number of features used ...
int sFactor; // Source Factor ...
int tFactor; // Target Factor ...