diff options
author | Hieu Hoang <fishandfrolick@gmail.com> | 2013-06-05 03:50:24 +0400 |
---|---|---|
committer | Hieu Hoang <fishandfrolick@gmail.com> | 2013-06-05 03:50:24 +0400 |
commit | cc0f00049efbe432c56bdba9b2e21ba765a83881 (patch) | |
tree | 1a7336a8eaf5c16682ee148a104b68ca9981175f /moses/ConfusionNet.cpp | |
parent | fc7e4f455011f02928c45265b2fa2b3a27e6d80f (diff) |
update confusion network to query InputFeature for paramters, rather than StaticData
Diffstat (limited to 'moses/ConfusionNet.cpp')
-rw-r--r-- | moses/ConfusionNet.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/moses/ConfusionNet.cpp b/moses/ConfusionNet.cpp index ae88a2477..8281237fd 100644 --- a/moses/ConfusionNet.cpp +++ b/moses/ConfusionNet.cpp @@ -10,6 +10,7 @@ #include "StaticData.h" #include "Sentence.h" #include "UserMessage.h" +#include "moses/FF/InputFeature.h" namespace Moses { @@ -118,8 +119,14 @@ bool ConfusionNet::ReadFormat0(std::istream& in, const std::vector<FactorType>& factorOrder) { Clear(); - size_t numInputScores = StaticData::Instance().GetNumInputScores(); - size_t numRealWordCount = StaticData::Instance().GetNumRealWordsInInput(); + + const StaticData &staticData = StaticData::Instance(); + const InputFeature *inputFeature = staticData.GetInputFeature(); + size_t numInputScores = inputFeature->GetNumInputScores(); + size_t numRealWordCount = inputFeature->GetNumRealWordsInInput(); + //size_t numInputScores = staticData.GetNumInputScores(); + //size_t numRealWordCount = staticData.GetNumRealWordsInInput(); + size_t totalCount = numInputScores + numRealWordCount; bool addRealWordCount = (numRealWordCount > 0); |