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 <fishandfrolick@gmail.com>2013-06-05 03:50:24 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2013-06-05 03:50:24 +0400
commitcc0f00049efbe432c56bdba9b2e21ba765a83881 (patch)
tree1a7336a8eaf5c16682ee148a104b68ca9981175f /moses/WordLattice.cpp
parentfc7e4f455011f02928c45265b2fa2b3a27e6d80f (diff)
update confusion network to query InputFeature for paramters, rather than StaticData
Diffstat (limited to 'moses/WordLattice.cpp')
-rw-r--r--moses/WordLattice.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/moses/WordLattice.cpp b/moses/WordLattice.cpp
index 3a93b6c3a..5b4828921 100644
--- a/moses/WordLattice.cpp
+++ b/moses/WordLattice.cpp
@@ -3,6 +3,7 @@
#include "PCNTools.h"
#include "Util.h"
#include "FloydWarshall.h"
+#include "moses/FF/InputFeature.h"
namespace Moses
{
@@ -33,10 +34,15 @@ void WordLattice::Print(std::ostream& out) const
int WordLattice::InitializeFromPCNDataType(const PCN::CN& cn, const std::vector<FactorType>& factorOrder, const std::string& debug_line)
{
- size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength();
-
+ const StaticData &staticData = StaticData::Instance();
+ const InputFeature *inputFeature = staticData.GetInputFeature();
+ //size_t numInputScores = inputFeature->GetNumInputScores();
+ //size_t numRealWordCount = inputFeature->GetNumRealWordsInInput();
size_t numInputScores = StaticData::Instance().GetNumInputScores();
size_t numRealWordCount = StaticData::Instance().GetNumRealWordsInInput();
+
+ size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength();
+
bool addRealWordCount = (numRealWordCount > 0);
//when we have one more weight than params, we add a word count feature