diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-12-07 04:21:06 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-12-07 04:21:06 +0400 |
commit | ba209202efa9fbb410078fdc7efc5b52827fc600 (patch) | |
tree | f52ccfb03989e37fe301202876af8f5661f7bd63 /moses/WordLattice.cpp | |
parent | a5d0296699c7b4214ea897b36de299ca91d7c729 (diff) |
move all feature functions out of StaticData
Diffstat (limited to 'moses/WordLattice.cpp')
-rw-r--r-- | moses/WordLattice.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/moses/WordLattice.cpp b/moses/WordLattice.cpp index a3055c65c..8dfc5879d 100644 --- a/moses/WordLattice.cpp +++ b/moses/WordLattice.cpp @@ -12,7 +12,7 @@ namespace Moses { WordLattice::WordLattice() { - UTIL_THROW_IF2(StaticData::Instance().GetInputFeature() == NULL, + UTIL_THROW_IF2(&InputFeature::Instance() == NULL, "Input feature must be specified"); } @@ -52,9 +52,9 @@ void WordLattice::Print(std::ostream& out) const int WordLattice::InitializeFromPCNDataType(const PCN::CN& cn, const std::vector<FactorType>& factorOrder, const std::string& debug_line) { const StaticData &staticData = StaticData::Instance(); - const InputFeature *inputFeature = staticData.GetInputFeature(); - size_t numInputScores = inputFeature->GetNumInputScores(); - size_t numRealWordCount = inputFeature->GetNumRealWordsInInput(); + const InputFeature &inputFeature = InputFeature::Instance(); + size_t numInputScores = inputFeature.GetNumInputScores(); + size_t numRealWordCount = inputFeature.GetNumRealWordsInInput(); size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength(); |